diff options
author | walter harms <wharms@bfs.de> | 2014-06-05 18:37:40 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-06-06 17:16:40 -0700 |
commit | 0b7fd7dbec136bae317bd9a329309eaa089beee3 (patch) | |
tree | ac091a6d4217137dfb96139decee1e0ff2e24124 /src/ScrResStr.c | |
parent | 7d452fad5068ba92b964e92bc46708046f4044aa (diff) | |
download | xorg-lib-libX11-0b7fd7dbec136bae317bd9a329309eaa089beee3.tar.gz |
Remove redundant null checks before free
This patch removes some redundant null checks before free.
It should not change the code otherwise. Be aware that this
is only the first series.
Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/ScrResStr.c')
-rw-r--r-- | src/ScrResStr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ScrResStr.c b/src/ScrResStr.c index 0601c864..4a5491a3 100644 --- a/src/ScrResStr.c +++ b/src/ScrResStr.c @@ -48,8 +48,7 @@ char *XScreenResourceString(Screen *screen) (unsigned char **) &val) == Success) { if ((actual_type == XA_STRING) && (actual_format == 8)) return val; - if (val) - Xfree(val); + Xfree(val); } return (char *)NULL; } |