btrfs-progs: use the correct variable
authorAnand Jain <anand.jain@oracle.com>
Mon, 11 May 2015 13:55:52 +0000 (21:55 +0800)
committerDavid Sterba <dsterba@suse.cz>
Thu, 14 May 2015 13:41:07 +0000 (15:41 +0200)
It's res instead of ret, wrong error message could be prointed in case
of error.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-device.c

index cbb3243..1022656 100644 (file)
@@ -183,7 +183,7 @@ static int cmd_rm_dev(int argc, char **argv)
                if (res) {
                        const char *msg;
 
-                       if (ret > 0)
+                       if (res > 0)
                                msg = btrfs_err_str(res);
                        else
                                msg = strerror(e);