projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63ee1e7
)
Remove redundant NULL checks
author
Panu Matilainen
<pmatilai@redhat.com>
Thu, 19 May 2011 08:08:07 +0000
(11:08 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Thu, 19 May 2011 08:08:07 +0000
(11:08 +0300)
- Fclose() handles NULL by itself, no need to check in callers.
Also no need to NULL'ify the local variables here.
build/pack.c
patch
|
blob
|
history
diff --git
a/build/pack.c
b/build/pack.c
index
9d4f404
..
5a0e844
100644
(file)
--- a/
build/pack.c
+++ b/
build/pack.c
@@
-499,14
+499,9
@@
exit:
}
sig = rpmFreeSignature(sig);
- if (ifd) {
- (void) Fclose(ifd);
- ifd = NULL;
- }
- if (fd) {
- (void) Fclose(fd);
- fd = NULL;
- }
+ Fclose(ifd);
+ Fclose(fd);
+
if (sigtarget) {
(void) unlink(sigtarget);
sigtarget = _free(sigtarget);