summaryrefslogtreecommitdiffstats
path: root/sys-utils/losetup.c
diff options
context:
space:
mode:
authorSami Kerola2013-11-20 01:57:03 +0100
committerKarel Zak2013-12-02 10:59:20 +0100
commitf614b73c0eb18b554e950df487f66ed6e13ca0fc (patch)
treed9d9dc6597b759405399d98fdbf12e8ea218820c /sys-utils/losetup.c
parentlibfdisk: (dos) warn on type 0 (diff)
downloadkernel-qcow2-util-linux-f614b73c0eb18b554e950df487f66ed6e13ca0fc.tar.gz
kernel-qcow2-util-linux-f614b73c0eb18b554e950df487f66ed6e13ca0fc.tar.xz
kernel-qcow2-util-linux-f614b73c0eb18b554e950df487f66ed6e13ca0fc.zip
losetup, agetty: remove unnecessary if's before free()
Reference: http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/useless-if-before-free Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/losetup.c')
-rw-r--r--sys-utils/losetup.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
index 5be328848..70d9155c0 100644
--- a/sys-utils/losetup.c
+++ b/sys-utils/losetup.c
@@ -184,8 +184,7 @@ static int show_all_loops(struct loopdev_cxt *lc, const char *file,
printf_loopdev(lc);
}
loopcxt_deinit_iterator(lc);
- if (cn_file)
- free(cn_file);
+ free(cn_file);
return 0;
}
@@ -351,8 +350,7 @@ static int make_table(struct loopdev_cxt *lc,
}
loopcxt_deinit_iterator(lc);
- if (cn_file)
- free(cn_file);
+ free(cn_file);
return 0;
}