Browse Source

cmd: mtdparts: fix uninitialized variable warning

commit 06a040a31b ("cmd: mtdparts: fix null pointer dereference in parse_mtdparts")
removed the initialization of a pointer variable, which is
subsequently used in a debug() call. This produces an uninitialized
variable warning, when compiling with DEBUG defined.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
tags/2020-06-01
Lothar Waßmann 4 years ago
committed by Tom Rini
parent
commit
1aca4d5ae9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      cmd/mtdparts.c

+ 1
- 1
cmd/mtdparts.c View File

@@ -1556,7 +1556,7 @@ static int parse_mtdparts(const char *const mtdparts)
int err = 1;
char tmp_parts[MTDPARTS_MAXLEN];

debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", p);
debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", mtdparts);

/* delete all devices and partitions */
if (mtd_devices_init() != 0) {