Use known sized integers, because the INSTREAM protocol depends upon it.
Remove two unused variables.
Buf will always evaluate to true.