cmd: mbr: return false instead of NULL from bool found_key()

found_key() is declared to return bool but returns NULL when strdup()
fails. NULL is a pointer constant; while it happens to convert to
zero (i.e. false) it is a type mismatch that trips stricter
compilers/static analysers.

Return false to match the declared return type.

Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
This commit is contained in:
Naveen Kumar Chaudhary
2026-07-23 15:16:09 -06:00
committed by Tom Rini
parent 0ccd0a939d
commit f7b525a8bc
+1 -1
View File
@@ -73,7 +73,7 @@ static bool found_key(const char *str, const char *key)
strcopy = strdup(str);
if (!strcopy)
return NULL;
return false;
s = strcopy;
while (s) {