From: Alan T. DeKok Date: Sun, 1 Jul 2018 12:23:07 +0000 (-0400) Subject: minor cleanups X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2b912ce47dfc949fb2584b0e4769cf66372df05;p=thirdparty%2Ffreeradius-server.git minor cleanups --- diff --git a/src/main/radmin.c b/src/main/radmin.c index 39b7ef4b4d5..d652582aa1d 100644 --- a/src/main/radmin.c +++ b/src/main/radmin.c @@ -55,13 +55,15 @@ static pthread_t pthread_id; static bool stop = false; #ifndef USE_READLINE +/* + * @todo - use thread-local storage + */ static char *readline_buffer[1024]; static char *readline(char const *prompt) { char *line, *p; -redo: puts(prompt); fflush(stdout); @@ -70,8 +72,7 @@ redo: p = strchr(line, '\n'); if (!p) { - fprintf(stderr, "%s: Input line too long\n", - "XXX"); + fprintf(stderr, "Input line too long\n"); fr_exit_now(EXIT_FAILURE); } @@ -98,7 +99,7 @@ redo: /* * Comments: keep going. */ - if (!line) goto redo; + if (!line) return line; /* * Strip off CR / LF