Wireshark mailing list archives

Re: [Wireshark-commits] master e16500e: Fix check for NUL at the end of a string.


From: Graham Bloice <graham.bloice () trihedral com>
Date: Wed, 13 May 2015 10:08:59 +0100

On 13 May 2015 at 07:28, Bálint Réczey <balint () balintreczey hu> wrote:

2015-05-13 0:26 GMT+02:00 Guy Harris <guy () alum mit edu>:

On May 12, 2015, at 3:13 PM, Evan Huus <eapache () gmail com> wrote:

Argh, one of these days I will learn to just put parentheses in rather
than taking guesses at C operator precedence :(

Yeah, the rule I've found works best for me is "if you aren't certain,
throw parentheses at it".
Yes, in this case parentheses are a must.
I also llike putting them when the reader may not guess the precedence
correctly easily. This reader can be myself later ;-).


I have a colleague who for reasons only known to himself is violently
against "unnecessary" parentheses, so I always put in even more just for
him.

My rule is to parenthesise wherever multiple operators appear in an
expression.  Even more important where the team is working in multiple
programming languages with different precedence rules.


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

Current thread: