projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb39e76
)
btrfs-progs: remove unnecessary NULL check after get_df()
author
Satoru Takeuchi
<takeuchi_satoru@jp.fujitsu.com>
Wed, 30 Jul 2014 07:26:32 +0000
(16:26 +0900)
committer
David Sterba
<dsterba@suse.cz>
Fri, 22 Aug 2014 13:07:03 +0000
(15:07 +0200)
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>
cmds-filesystem.c
patch
|
blob
|
history
diff --git
a/cmds-filesystem.c
b/cmds-filesystem.c
index
4675499
..
1dc686e
100644
(file)
--- 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 {