From: Kern Sibbald Date: Wed, 10 May 2017 07:50:48 +0000 (+0200) Subject: Tweak eliminate compiler warning X-Git-Tag: Release-7.9.0~39 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f490913c88391ab72b822b20b700592b397d943a;p=bacula%2Fbacula Tweak eliminate compiler warning --- diff --git a/bacula/src/console/console.c b/bacula/src/console/console.c index 01bccf8efd..5890afe3dc 100644 --- a/bacula/src/console/console.c +++ b/bacula/src/console/console.c @@ -845,7 +845,6 @@ wait_for_data(int fd, int sec) int get_cmd(FILE *input, const char *prompt, BSOCK *sock, int sec) { - int len; if (!stop) { if (output == stdout || teeout) { sendit(prompt); @@ -858,20 +857,19 @@ again: case -1: return -1; /* error */ default: - len = sizeof_pool_memory(sock->msg) - 1; if (stop) { sleep(1); goto again; } #ifdef HAVE_CONIO if (bisatty(fileno(input))) { - input_line(sock->msg, len); + input_line(sock->msg, sizeof_pool_memory(sock->msg)-1); break; } #endif #ifdef HAVE_WIN32 /* use special console for input on win32 */ if (input == stdin) { - if (win32_cgets(sock->msg, len) == NULL) { + if (win32_cgets(sock->msg, sizeof_pool_memory(sock->msg)-1) == NULL) { return -1; } }