Wireshark mailing list archives

Re: [Wireshark-commits] rev 45175: /trunk/epan/ /trunk/epan/: prefs.c


From: Jakub Zawadzki <darkjames-ws () darkjames pl>
Date: Thu, 27 Sep 2012 21:11:19 +0200

On Thu, Sep 27, 2012 at 11:38:22AM -0700, Guy Harris wrote:

On Sep 27, 2012, at 9:23 AM, gerald () wireshark org wrote:

http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=45175

User: gerald
Date: 2012/09/27 09:23 AM

Log:
Don't pass a null pointer to strcmp.

Is it ever possible that *pref->varp.string is null but value is non-null?  
If so, presumably that case should be treated as "unequal", just like the case 
where neither is null and strcmp() returns a non-zero value.

To do it, we can use g_strcmp0:
  http://developer.gnome.org/glib/2.28/glib-String-Utility-Functions.html#g-strcmp0
___________________________________________________________________________
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: