Ethereal-dev: Re: [Ethereal-dev] get a signed number from tvb

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 15 Apr 2005 17:20:25 -0700
Nina Pham wrote:
tvb_get... functions return unsigned number. Is there a way to get a signed number (gint32) from tvb?

Ethereal probably won't work on non-two's-complement systems, and most if not all protocols also use two's complement, so just assigning the result of "tvb_get_ntohl()" or "tvb_get_letohl()" to a "gint32" should be sufficient.