]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/rbd: Removed unreachable returns
authorJos Collin <jcollin@redhat.com>
Thu, 13 Jul 2017 01:50:04 +0000 (07:20 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 26 Jul 2017 01:44:16 +0000 (07:14 +0530)
Removed unreachable returns as the usage() always exits the process.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/tools/rbd_nbd/rbd-nbd.cc

index 5e7f98dcaa4d0b1bc775a50d73853f6832af9e01..a3d3577310ccfe78e83157f0df03147936f14d0d 100644 (file)
@@ -1028,7 +1028,7 @@ static int rbd_nbd(int argc, const char *argv[])
   r = parse_args(args, &err_msg, &cfg);
   if (r == HELP_INFO) {
     usage();
-    return 0;
+    assert(false);
   } else if (r == VERSION_INFO) {
     std::cout << pretty_version_to_str() << std::endl;
     return 0;
@@ -1061,7 +1061,8 @@ static int rbd_nbd(int argc, const char *argv[])
       break;
     default:
       usage();
-      return -EINVAL;
+      assert(false);
+      break;
   }
 
   return 0;