From: Marco van Wieringen Date: Tue, 27 Oct 2009 20:14:06 +0000 (+0100) Subject: Small fix to Eric great patch for readline commandcompletion so it also compiles... X-Git-Tag: Release-7.0.0~2598^2~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f4f5c3610d9759c90f8070133f629979aa18a21b;p=bacula%2Fbacula Small fix to Eric great patch for readline commandcompletion so it also compiles on non gcc compilers. --- diff --git a/bacula/src/console/console.c b/bacula/src/console/console.c index af1e4ca713..a2023d1f04 100644 --- a/bacula/src/console/console.c +++ b/bacula/src/console/console.c @@ -460,12 +460,12 @@ static void match_kw(regex_t *preg, const char *what, int len, POOLMEM **buf) { int rc, size; int nmatch=20; - regmatch_t pmatch[nmatch]; + regmatch_t pmatch[20]; if (len <= 0) { return; } - rc = regexec(preg, what, nmatch, pmatch, 0); + rc = regexec(preg, what, nmatch, pmatch, 0); if (rc == 0) { size = pmatch[0].rm_eo - pmatch[0].rm_so;