From: Eric S. Raymond Date: Tue, 28 Feb 2023 23:54:07 +0000 (-0500) Subject: cppcheck cleanup. X-Git-Tag: 1.13~1 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b8c7a6d5ea9e568631cc84e04bf0d8861b6f99ec;p=open-adventure.git cppcheck cleanup. --- diff --git a/misc.c b/misc.c index cf404f7..7365fbf 100644 --- a/misc.c +++ b/misc.c @@ -221,8 +221,8 @@ static char* get_input(void) // Print a blank line printf("\n"); - char* input; - while (true) { + char* input = ""; + for (;;) { input = myreadline(input_prompt); if (input == NULL) // Got EOF; return with it.