Wireshark mailing list archives

Re: [Wireshark-commits] rev 45566: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-rdp.c


From: Martin Kaiser <lists () kaiser cx>
Date: Thu, 18 Oct 2012 23:11:27 +0200

Hi,

Thus wrote Maynard, Chris (Christopher.Maynard () GTECH COM):

Recently, I found and fixed some of these problems, but obviously I
didn't catch them all.  Are there any more thoughts about changing
tvb_length_remaining() and tvb_reported_length_remaining() to return 0
instead of -1?

it looks like there's quite a few places where people used an unsigned
return value (I just fixed a few obvious cases).
I guess we should do something about this in the tvb part rather than in
the dissectors. 

What's the difference between return value 0 and -1 now? Both are
essentially saying there's no data left, -1 is an error case and 0
isn't? Is that significant to the caller, what can he do other than stop
reading?

   Martin
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: