summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-21 02:11:11 +0100
committerDan McGee <dan@archlinux.org>2011-03-21 02:11:11 +0100
commit78e55be0e6e51fe34e51544070c69cb6634b7eff (patch)
tree65dfa47cfade440cf0e7748cdfd7d87b1e55f116 /src
parent32e35d4028f30db5fc7cf96478015be293e4d123 (diff)
downloadpacman-78e55be0e6e51fe34e51544070c69cb6634b7eff.tar.gz
pacman-78e55be0e6e51fe34e51544070c69cb6634b7eff.tar.xz
Remove unnecessary NULL check
fp can never be NULL at this point in the code, proven by Coccinelle. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 55f99a66..591b2a00 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -1230,9 +1230,7 @@ static int _parseconfig(const char *file, const char *givensection,
}
cleanup:
- if(fp) {
- fclose(fp);
- }
+ fclose(fp);
if(section){
free(section);
}