Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/gtk prefs_dlg.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Mar 2003 17:14:43 -0600 (CST)
guy         2003/03/11 17:14:43 CST

  Modified files:
    gtk                  prefs_dlg.c 
  Log:
  When registering a string preference, if the value of the preference is
  NULL, convert it to a copy of a null string, otherwise replace it with a
  copy of the string, so that we know that the variable for the preference
  always points to a string that can be freed.
  
  That also obviates the need to worry about a null-pointer value for a
  preference variable when checking to see whether a preference has changed.
  
  When checking for a string preference not being set, check for an empty
  string, not a null pointer - the above code turns null pointers into
  pointers to empty strings, *and* the GUI code does (and always did!) the
  same.
  
  Revision  Changes    Path
  1.59      +5 -10     ethereal/gtk/prefs_dlg.c