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/lcGenConv.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/lcGenConv.c')
-rw-r--r-- | nx-X11/lib/X11/lcGenConv.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/nx-X11/lib/X11/lcGenConv.c b/nx-X11/lib/X11/lcGenConv.c index c816c25d4..eede76807 100644 --- a/nx-X11/lib/X11/lcGenConv.c +++ b/nx-X11/lib/X11/lcGenConv.c @@ -1225,8 +1225,7 @@ stdc_wcstocts( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -1548,8 +1547,7 @@ stdc_ctstowcs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -1584,8 +1582,7 @@ stdc_cstowcs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -1620,8 +1617,7 @@ mbstocts( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2071,8 +2067,7 @@ stdc_wcstostr( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2346,8 +2341,7 @@ ctstombs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2382,8 +2376,7 @@ cstombs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2591,8 +2584,7 @@ stdc_strtowcs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2605,14 +2597,8 @@ static void close_converter( XlcConv conv) { - if (conv->state) { - Xfree(conv->state); - } - - if (conv->methods) { - Xfree(conv->methods); - } - + Xfree(conv->state); + Xfree(conv->methods); Xfree(conv); } |