Satoru Takeuchi
2014-Jul-30 07:26 UTC
[PATCH] btrfs-progs: remove unnecessary NULL check after get_df()
From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> 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> --- cmds-filesystem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index bf87bbe..38011e5 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -201,7 +201,7 @@ static int cmd_filesystem_df(int argc, char **argv) } ret = get_df(fd, &sargs); - if (!ret && sargs) { + if (ret == 0) { print_df(sargs); free(sargs); } else { -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html