* 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.
+2008-06-02 Jim Meyering <meyering@redhat.com>
+
+ 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.
+
2008-05-30 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (lisp2): Add minibuffer.elc.
xfree (p)
void *p;
{
- if (p)
- free (p);
+ free (p);
}
pfatal (file);
cleanup:
- if (compressed_name) free (compressed_name);
- if (uncompressed_name) free (uncompressed_name);
+ free (compressed_name);
+ free (uncompressed_name);
last_node = NULL;
curfdp = NULL;
return;
{
register node *node_right = np->right;
free_tree (np->left);
- if (np->name != NULL)
- free (np->name);
+ free (np->name);
free (np->regex);
free (np);
np = node_right;
free_fdesc (fdp)
register fdesc *fdp;
{
- if (fdp->infname != NULL) free (fdp->infname);
- if (fdp->infabsname != NULL) free (fdp->infabsname);
- if (fdp->infabsdir != NULL) free (fdp->infabsdir);
- if (fdp->taggedfname != NULL) free (fdp->taggedfname);
- if (fdp->prop != NULL) free (fdp->prop);
+ free (fdp->infname);
+ free (fdp->infabsname);
+ free (fdp->infabsdir);
+ free (fdp->taggedfname);
+ free (fdp->prop);
free (fdp);
}
nl >= 0 && cstack.bracelev[nl] >= bracelev;
nl--)
{
- if (cstack.cname[nl] != NULL)
- free (cstack.cname[nl]);
+ free (cstack.cname[nl]);
cstack.nl = nl;
}
}
last[len] = '\0';
}
}
- if (last != NULL)
- free (last);
+ free (last);
}
last[len] = '\0';
}
}
- if (last != NULL)
- free (last);
+ free (last);
}
close (server->file);
}
- if (server->buffer)
- free (server->buffer);
+ free (server->buffer);
free ((char *) server);
return (ret);
+2008-06-02 Jim Meyering <meyering@redhat.com>
+
+ remove useless if-before-free tests
+ * lwlib/lwlib-Xm.c (xm_update_one_value): Likewise.
+ * lwlib/lwlib.c (safe_free_str, free_widget_value_tree): Likewise.
+
2008-04-18 Stefan Monnier <monnier@iro.umontreal.ca>
* Makefile.in (TOOLKIT_DEFINES): Remove.
}
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;
}
XtVaGetValues (toggle, XmNset, &set, NULL);
if (set)
{
- if (val->value)
- free (val->value);
+ free (val->value);
val->value = safe_strdup (XtName (toggle));
}
}
safe_free_str (s)
char *s;
{
- if (s) free (s);
+ free (s);
}
static widget_value *widget_value_free_list = 0;
if (!wv)
return;
- if (wv->name) free (wv->name);
- if (wv->value) free (wv->value);
- if (wv->key) free (wv->key);
+ free (wv->name);
+ free (wv->value);
+ free (wv->key);
wv->name = wv->value = wv->key = (char *) 0xDEADBEEF;
+2008-06-02 Jim Meyering <meyering@redhat.com>
+
+ remove useless if-before-free tests
+ * 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.
+
2008-06-02 Kenichi Handa <handa@m17n.org>
* font.c (font_find_for_lface): Handle float font size.
}
set_time_zone_rule (tzstring);
- if (environbuf)
- free (environbuf);
+ free (environbuf);
environbuf = environ;
return Qnil;
UNGCPRO;
- if (saved_doc_string)
- free (saved_doc_string);
+ free (saved_doc_string);
saved_doc_string = 0;
saved_doc_string_size = 0;
if (! (new_bloc = (bloc_ptr) malloc (BLOC_PTR_SIZE))
|| ! (new_bloc->data = obtain (break_value, size)))
{
- if (new_bloc)
- free (new_bloc);
+ free (new_bloc);
return 0;
}
regfree (preg)
regex_t *preg;
{
- if (preg->buffer != NULL)
- free (preg->buffer);
+ free (preg->buffer);
preg->buffer = NULL;
preg->allocated = 0;
preg->used = 0;
- if (preg->fastmap != NULL)
- free (preg->fastmap);
+ free (preg->fastmap);
preg->fastmap = NULL;
preg->fastmap_accurate = 0;
- if (preg->translate != NULL)
- free (preg->translate);
+ free (preg->translate);
preg->translate = NULL;
}
WEAK_ALIAS (__regfree, regfree)
{
XrmDatabase db = XrmGetFileDatabase (file);
free (file);
- if (free_it)
- free (free_it);
+ free (free_it);
return db;
}
- if (free_it)
- free (free_it);
+ free (free_it);
return NULL;
}
db = XrmGetFileDatabase (p);
- if (path) free (path);
- if (home) free (home);
+ free (path);
+ free (home);
return db;
}
/* Figure out what the "customization string" is, so we can use it
to decode paths. */
- if (x_customization_string)
- free (x_customization_string);
+ free (x_customization_string);
x_customization_string
= x_get_customization_string (user_database, myname, myclass);
xfree (smid_opt);
- if (cwd)
- free (cwd);
+ free (cwd);
/* See if we maybe shall interact with the user. */
if (interactStyle != SmInteractStyleAny