[PATCH 1/5] commands: nv: argc cannot be < 1

Enrico Jorns ejo at pengutronix.de
Wed Sep 13 05:23:28 PDT 2017


argc == 1 will only contain the name of the program itself which must be
present when invoking nv command code.

Signed-off-by: Enrico Jorns <ejo at pengutronix.de>
---
 commands/nv.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/commands/nv.c b/commands/nv.c
index 37cdb96647..eb396bfd9b 100644
--- a/commands/nv.c
+++ b/commands/nv.c
@@ -55,9 +55,6 @@ static int do_nv(int argc, char *argv[])
 	argc -= optind;
 	argv += optind;
 
-	if (argc < 1)
-		return COMMAND_ERROR_USAGE;
-
 	for (i = 0; i < argc; i++) {
 		value = strchr(argv[0], '=');
 		if (value) {
-- 
2.11.0




More information about the barebox mailing list