Fix signed/unsigned comparison warning

buftmp should be a uint, not an int