diff options
author | Jim Meyering <jim@meyering.net> | 2008-06-02 06:00:54 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2008-06-02 06:00:54 +0000 |
commit | c2cd06e61e6f21eeb1077b557a22cc5aaf795676 (patch) | |
tree | ec7d44c58c8b7f4a84065a04163351dc9c96f552 /lwlib/lwlib-Xm.c | |
parent | 437eedba09d67a807d2547886bd3e8fae81138a3 (diff) | |
download | emacs-c2cd06e61e6f21eeb1077b557a22cc5aaf795676.tar.gz |
remove useless if-before-free tests
* lib-src/ebrowse.c (xfree): Likewise.
* lib-src/etags.c (process_file_name, free_tree, free_fdesc): Likewise.
(popclass_above, Prolog_functions, Erlang_functions): Likewise.
* lib-src/pop.c (pop_quit): Likewise.
* lwlib/lwlib-Xm.c (xm_update_one_value): Likewise.
* lwlib/lwlib.c (safe_free_str, free_widget_value_tree): Likewise.
* src/editfns.c (Fset_time_zone_rule): Likewise.
* src/lread.c (nosuffix): Likewise.
* src/ralloc.c (get_bloc): Likewise.
* src/regex.c (reg_free): Likewise.
* src/xftfont.c (xftfont_open, xftfont_close): Likewise.
* src/xrdb.c (get_user_app, get_environ_db, x_load_resources): Likewise.
* src/xsmfns.c (smc_save_yourself_CB): Likewise.
Diffstat (limited to 'lwlib/lwlib-Xm.c')
-rw-r--r-- | lwlib/lwlib-Xm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 83df050b88e..7c91fe83e46 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -956,15 +956,13 @@ xm_update_one_value (instance, widget, val) } else if (class == xmTextWidgetClass) { - if (val->value) - free (val->value); + free (val->value); val->value = XmTextGetString (widget); val->edited = True; } else if (class == xmTextFieldWidgetClass) { - if (val->value) - free (val->value); + free (val->value); val->value = XmTextFieldGetString (widget); val->edited = True; } @@ -989,8 +987,7 @@ xm_update_one_value (instance, widget, val) XtVaGetValues (toggle, XmNset, &set, NULL); if (set) { - if (val->value) - free (val->value); + free (val->value); val->value = safe_strdup (XtName (toggle)); } } |