]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpcli: fix readline() wrapper to take prompt as argument
authorVincent Bernat <bernat@luffy.cx>
Thu, 20 Feb 2014 20:57:29 +0000 (21:57 +0100)
committerVincent Bernat <bernat@luffy.cx>
Thu, 20 Feb 2014 20:57:29 +0000 (21:57 +0100)
`readline()` is expecting the prompt as argument. We fix the wrapper to
have the same requirement.

src/client/lldpcli.c

index 4223c90f253ab95dfc29bbed949f81a1c6290d7e..35c1b94d0d3ecc32005837f70e4a6ac7289140a5 100644 (file)
@@ -239,10 +239,10 @@ cmd_help(int count, int ch)
 }
 #else
 static char*
-readline()
+readline(const char *p)
 {
        static char line[2048];
-       fprintf(stderr, "%s", prompt());
+       fprintf(stderr, "%s", p);
        fflush(stderr);
        if (fgets(line, sizeof(line) - 2, stdin) == NULL)
                return NULL;