Wireshark mailing list archives

Re: static packet_info* g_info in GSM dissectors


From: Anders Broman <a.broman () bredband net>
Date: Fri, 03 May 2013 06:41:07 +0200

mmann78 () netscape net skrev 2013-05-02 23:03:
I stumbled across the use of a packet_info* global variable (g_info) in some of the GSM dissectors. Is this really necessary? I thought it could have been just like the IEEE802.11 dissector in that it just didn't want to proliferate passing the packet_info structure everywhere, but I see functions that pass in a packet_info structure, but use the global instead (which really scared me). It also appears like the global is used by functions called from other dissectors (where the function doesn't have a packet_info to pass in).

I can take the hit and work out all of the compiler errors that result from removing the global (and proliferating the packet_info structure into functions), but it would it be safe to do so?

Michael
Yes I think so.
Anders


___________________________________________________________________________
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

___________________________________________________________________________
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: