When you write &buflen, it means: the memory address of where the variable named "buflen" is stored.
Obviously you want to get the value that is stored at this address, so simply use:
for(i = 0; i < buflen; i++)
When you write &buflen, it means: the memory address of where the variable named "buflen" is stored.
Obviously you want to get the value that is stored at this address, so simply use:
for(i = 0; i < buflen; i++)