[Pidgin] #13238: vvconfig: Use compare function that will not crash on NULL string

Pidgin trac at pidgin.im
Thu Jan 20 21:44:01 EST 2011


#13238: vvconfig: Use compare function that will not crash on NULL string
-----------------------------------------+----------------------------------
 Reporter:  haakon                       |        Owner:         
     Type:  patch                        |       Status:  new    
Milestone:  Patches Needing Improvement  |    Component:  plugins
  Version:  2.7.9                        |   Resolution:         
 Keywords:  vvconfig crash strcmp        |  
-----------------------------------------+----------------------------------
Changes (by darkrain42):

  * milestone:  Patches Needing Review => Patches Needing Improvement


Comment:

 purple_strequal is not actually a GCompareFunc.  It returns TRUE or FALSE,
 whereas strcmp-like functions return -1, 0, or 1 (where 0, a.k.a. FALSE,
 means the two strings are 'equal').

 Something like g_strcmp0 would do exactly what you're looking for, but
 neither rekkanoryo nor I recalled (off the top of our heads) if our V/V
 code requires glib 2.16 or not (I vaguely think it's actually glib 2.14)

-- 
Ticket URL: <http://developer.pidgin.im/ticket/13238#comment:2>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list