From: Ben Mezger Date: Thu, 16 Mar 2017 15:30:27 +0000 (-0300) Subject: Prevent arg from being used any further X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=81ae2bc455a73c05792f181d5497cdbd33f3c135;p=minix.git Prevent arg from being used any further Patch edited by David van Moolenbroek. Change-Id: Ie25faffea359e735145dbb4ae2bd2d213488952b --- diff --git a/minix/kernel/utility.c b/minix/kernel/utility.c index de67e2dce..2cba5067d 100644 --- a/minix/kernel/utility.c +++ b/minix/kernel/utility.c @@ -31,6 +31,7 @@ void panic(const char *fmt, ...) printf("kernel panic: "); va_start(arg, fmt); vprintf(fmt, arg); + va_end(arg); printf("\n"); } @@ -70,7 +71,7 @@ void kputc( kmess.km_buf[kmess.km_next] = c; /* put normal char in buffer */ kmess.kmess_buf[kmess.blpos] = c; if (kmess.km_size < sizeof(kmess.km_buf)) - kmess.km_size += 1; + kmess.km_size += 1; kmess.km_next = (kmess.km_next + 1) % _KMESS_BUF_SIZE; if(kmess.blpos == maxblpos) { memmove(kmess.kmess_buf,