Wireshark-dev: Re: [Wireshark-dev] static packet_info* g_info in GSM dissectors
From: Anders Broman <[email protected]>
Date: Fri, 03 May 2013 06:41:07 +0200
[email protected] 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?

Yes I think so.

Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe