From: Maxime Ripard Date: Tue, 5 Jul 2016 08:26:34 +0000 (+0200) Subject: cmd: fdt: Narrow the check for fdt addr X-Git-Tag: v2016.09-rc2~30 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f0ed68e21f219c1bee52b73183660e5e88b06e0f;p=oweals%2Fu-boot.git cmd: fdt: Narrow the check for fdt addr The current code only checks if the fdt subcommand is fdt addr by checking whether it starts with 'a'. Since this is a pretty widely used letter, narrow down that check a bit. Acked-by: Simon Glass Acked-by: Pantelis Antoniou Signed-off-by: Maxime Ripard --- diff --git a/cmd/fdt.c b/cmd/fdt.c index 898217ffe5..0f5923e75a 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -87,7 +87,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* * Set the address of the fdt */ - if (argv[1][0] == 'a') { + if (strncmp(argv[1], "ad", 2) == 0) { unsigned long addr; int control = 0; struct fdt_header *blob;