diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-11-06 17:15:43 -0600 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-11-07 16:10:41 -0500 |
commit | 12c3c9509b79b9e99c8e907f199781a2b097b6e5 (patch) | |
tree | 320cd1078f3ac89ef5941dc36f4827878d12ba7a /cmds-send.c | |
parent | 6e6e886809ed5e86979ebeca9cbcc550c49a69c8 (diff) |
btrfs-progs: fix test for return of realpath in find_mount_root()
find_mount_root() tries to test for realpath() failure, but
tests the wrong value. Fix it.
Resolves-Coverity-CID: 1125940
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'cmds-send.c')
-rw-r--r-- | cmds-send.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-send.c b/cmds-send.c index 39110e70..53e9a53d 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -98,7 +98,7 @@ int find_mount_root(const char *path, char **mount_root) ret = 0; *mount_root = realpath(longest_match, NULL); - if (!mount_root) + if (!*mount_root) ret = -errno; free(longest_match); |