cppcheck cleanup.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 28 Feb 2023 23:54:07 +0000 (18:54 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 28 Feb 2023 23:55:12 +0000 (18:55 -0500)
misc.c

diff --git a/misc.c b/misc.c
index cf404f7507f17268e7ab8098ee7cdff0559fcc36..7365fbf1a7bb3f0b04eb79587cbb2558a7b2ea40 100644 (file)
--- 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.