From: Simon Glass <sjg@chromium.org>
Date: Thu, 19 Aug 2021 03:40:24 +0000 (-0600)
Subject: sandbox: Correct handling of --rm_memory
X-Git-Tag: v2025.01-rc5-pxa1908~1694^2~17^2~19
X-Git-Url: http://git.dujemihanovic.xyz/%22/icons/right.gif/static/git-favicon.png?a=commitdiff_plain;h=130401e0171f4a17511bfd8ba061a11dc10ff18a;p=u-boot.git

sandbox: Correct handling of --rm_memory

This option has no argument so we should not trip to skip one.

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index 1103530941..151f42a5d6 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -690,7 +690,6 @@ static int add_args(char ***argvp, char *add_args[], int count)
 				continue;
 			}
 		} else if (!strcmp(arg, "--rm_memory")) {
-			ap++;
 			continue;
 		}
 		argv[argc++] = arg;