]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
swapon: remove unnecessary variable usage
authorKarel Zak <kzak@redhat.com>
Mon, 17 Mar 2025 09:54:55 +0000 (10:54 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 17 Mar 2025 09:54:55 +0000 (10:54 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/swapon.c

index f7f82bbfb9d5856320b46d2359b6bb089a7fc1f3..15efa481a2e5372d5d6f31917e79169e48c2b405 100644 (file)
@@ -1008,10 +1008,8 @@ int main(int argc, char *argv[])
        }
        argv += optind;
 
-       if (ctl.summarize) {
-               status = display_summary();
-               return status;
-       }
+       if (ctl.summarize)
+               return display_summary();
 
        if (ctl.show || (!ctl.all && !numof_labels() && !numof_uuids() && *argv == NULL)) {
                if (!ctl.ncolumns) {
@@ -1022,8 +1020,7 @@ int main(int argc, char *argv[])
                        ctl.columns[ctl.ncolumns++] = COL_USED;
                        ctl.columns[ctl.ncolumns++] = COL_PRIO;
                }
-               status = show_table(&ctl);
-               return status;
+               return show_table(&ctl);
        }
 
        if (ctl.props.no_fail && !ctl.all) {