Fix types in transceiver.c

Some of the types in transceiver.c do not make sense when returning negative values.