]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: shorten code a bit
authorLennart Poettering <lennart@poettering.net>
Mon, 6 Mar 2023 11:04:44 +0000 (12:04 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 9 Mar 2023 15:41:26 +0000 (16:41 +0100)
src/dissect/dissect.c

index a688e6f32caabf1b8e00b36407ebe40bde38873d..8b1f1bf20c82b069f81a85db9a06b36ed005252b 100644 (file)
@@ -1718,29 +1718,23 @@ static int run(int argc, char *argv[]) {
         switch (arg_action) {
 
         case ACTION_DISSECT:
-                r = action_dissect(m, d);
-                break;
+                return action_dissect(m, d);
 
         case ACTION_MOUNT:
-                r = action_mount(m, d);
-                break;
+                return action_mount(m, d);
 
         case ACTION_LIST:
         case ACTION_MTREE:
         case ACTION_COPY_FROM:
         case ACTION_COPY_TO:
-                r = action_list_or_mtree_or_copy(m, d);
-                break;
+                return action_list_or_mtree_or_copy(m, d);
 
         case ACTION_WITH:
-                r = action_with(m, d);
-                break;
+                return action_with(m, d);
 
         default:
                 assert_not_reached();
         }
-
-        return r;
 }
 
 DEFINE_MAIN_FUNCTION(run);