From f490913c88391ab72b822b20b700592b397d943a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 10 May 2017 09:50:48 +0200 Subject: [PATCH] Tweak eliminate compiler warning --- bacula/src/console/console.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } } -- 2.39.2