]> Zhao Yanbai Git Server - minix.git/commitdiff
Prevent arg from being used any further 91/3491/2
authorBen Mezger <me@benmezger.nl>
Thu, 16 Mar 2017 15:30:27 +0000 (12:30 -0300)
committerDavid van Moolenbroek <david@minix3.org>
Sat, 6 May 2017 22:54:19 +0000 (00:54 +0200)
Patch edited by David van Moolenbroek.

Change-Id: Ie25faffea359e735145dbb4ae2bd2d213488952b

minix/kernel/utility.c

index de67e2dce81738b32e523c3aac270e3b77f5d9e9..2cba5067dfca707de195a10876292d90adcdcf52 100644 (file)
@@ -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,