diff options
author | walter harms <wharms@bfs.de> | 2014-06-06 22:53:05 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:29 +0200 |
commit | 1ff6961231eda8929406b93fe3d70071cbba2469 (patch) | |
tree | 23b74007f819f15d2ab3acc2f55731cf17182a17 /nx-X11/lib/X11/omGeneric.c | |
parent | fc26b97ea9053a2aba54824243282e27bc4a1e15 (diff) | |
download | nx-libs-1ff6961231eda8929406b93fe3d70071cbba2469.tar.gz nx-libs-1ff6961231eda8929406b93fe3d70071cbba2469.tar.bz2 nx-libs-1ff6961231eda8929406b93fe3d70071cbba2469.zip |
Remove more redundant null checks before Xfree()
Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/omGeneric.c')
-rw-r--r-- | nx-X11/lib/X11/omGeneric.c | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/nx-X11/lib/X11/omGeneric.c b/nx-X11/lib/X11/omGeneric.c index 89d1b2ffd..91f4280d0 100644 --- a/nx-X11/lib/X11/omGeneric.c +++ b/nx-X11/lib/X11/omGeneric.c @@ -196,16 +196,12 @@ init_fontset( return True; err: - if(font_set->font_data) - Xfree(font_set->font_data); - if(font_set->substitute) - Xfree(font_set->substitute); - if(font_set->vmap) - Xfree(font_set->vmap); - if(font_set->vrotate) - Xfree(font_set->vrotate); - if(font_set) - Xfree(font_set); + + Xfree(font_set->font_data); + Xfree(font_set->substitute); + Xfree(font_set->vmap); + Xfree(font_set->vrotate); + Xfree(font_set); gen->font_set = (FontSet) NULL; gen->font_set_num = 0; return False; @@ -504,8 +500,8 @@ init_core_part( return True; err: - if (font_name_list) - Xfree(font_name_list); + + Xfree(font_name_list); Xfree(font_struct_list); return False; @@ -1486,24 +1482,15 @@ destroy_oc( */ /* For VW/UDC end */ - if (oc->core.base_name_list) - Xfree(oc->core.base_name_list); - - if (oc->core.font_info.font_name_list) - XFreeStringList(oc->core.font_info.font_name_list); - - if (oc->core.font_info.font_struct_list) { - Xfree(oc->core.font_info.font_struct_list); - } - - if (oc->core.missing_list.charset_list) - XFreeStringList(oc->core.missing_list.charset_list); + Xfree(oc->core.base_name_list); + XFreeStringList(oc->core.font_info.font_name_list); + Xfree(oc->core.font_info.font_struct_list); + XFreeStringList(oc->core.missing_list.charset_list); #ifdef notdef - if (oc->core.res_name) - Xfree(oc->core.res_name); - if (oc->core.res_class) - Xfree(oc->core.res_class); + + Xfree(oc->core.res_name); + Xfree(oc->core.res_class); #endif Xfree(oc); |