summaryrefslogtreecommitdiffstats
path: root/commands/nv.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/nv.c')
-rw-r--r--commands/nv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/commands/nv.c b/commands/nv.c
index 798b1ea..2e6d079 100644
--- a/commands/nv.c
+++ b/commands/nv.c
@@ -44,14 +44,15 @@ static int do_nv(int argc, char *argv[])
}
}
- if (do_save)
- return nvvar_save();
-
- if (argc == optind) {
+ if (argc == 1) {
nvvar_print();
return 0;
}
+ if (do_save) {
+ return nvvar_save();
+ }
+
argc -= optind;
argv += optind;