From 6f5ef9e4c7b240d67cdefb1232c9e85e43d31586 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 6 Mar 2023 12:04:44 +0100 Subject: dissect: shorten code a bit --- src/dissect/dissect.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index a688e6f32c..8b1f1bf20c 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -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); -- cgit v1.2.1