summaryrefslogtreecommitdiff
path: root/cmds-filesystem.c
diff options
context:
space:
mode:
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>2014-07-30 16:26:32 +0900
committerDavid Sterba <dsterba@suse.cz>2014-08-22 15:07:03 +0200
commitacf2652649e7338c89e164dba7c1409946dfb425 (patch)
tree17be83d20faef3174ebc02e0377ca13e6f65d3bc /cmds-filesystem.c
parenteb39e765f1c7f001f8b55c443a9878b2bc9ff6f7 (diff)
btrfs-progs: remove unnecessary NULL check after get_df()
If get_df() returns 0, "sargs" surely points to malloc'ed region. So NULL check of sargs is not necessary. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-filesystem.c')
-rw-r--r--cmds-filesystem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 46754998..1dc686eb 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -238,7 +238,7 @@ static int cmd_df(int argc, char **argv)
}
ret = get_df(fd, &sargs);
- if (!ret && sargs) {
+ if (ret == 0) {
print_df(sargs);
free(sargs);
} else {