Wireshark mailing list archives

static packet_info* g_info in GSM dissectors


From: mmann78 () netscape net
Date: Thu, 2 May 2013 17:03:59 -0400 (EDT)


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