Skip to contentSkip to conversation

scripts: generator-internals: Fix return value

PATCH New Rikard Falkeborn 1 participant 1 message May 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: generator-internals: Fix return value

Returning -1 from a function with bool as return type is the same as returning true. Change to false to indicate failure if there is an error in the child.

---
 scripts/generator-internals.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/generator-internals.c +1 -1
index 733e8189c..c39c35324 100644
@@ -101,7 +101,7 @@ static bool _close_child(struct child_process *child)
 
 	while (waitpid(child->pid, &status, 0) < 0)
 		if (errno != EINTR)
-			return -1;
+			return false;
 
 	if (WIFEXITED(status) && !WEXITSTATUS(status))
 		return true;
Signature · 1 line
2.21.0