Wireshark mailing list archives

Re: SET_ADDRESS, if-else


From: Evan Huus <eapache () gmail com>
Date: Sat, 7 Sep 2013 12:54:46 -0400

On Sat, Sep 7, 2013 at 12:46 PM, Gerald Combs <gerald () wireshark org> wrote:

On 9/7/13 5:53 AM, Evan Huus wrote:
The usual trick in this situation is to wrap the macro in a "do { MY
CODE } while (0)" so that it behaves syntactically like a normal
function call. I have done this in r51819, so it should work now.

Is there any reason we shouldn't convert the macros in address.h (and
proto.h and packet.h and ...) to inline functions?


No objections from me. I tried tracing some of them back through git and
got lost around 2004, so I don't actually know if there was a reason to
make them macros at the time (whenever that was).
___________________________________________________________________________
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: