Module Name:    src
Committed By:   rillig
Date:           Mon Mar  8 19:06:49 UTC 2021

Modified Files:
        src/usr.bin/indent: indent.c

Log Message:
indent: fix printing of uninitialized 'token' in debug output


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/usr.bin/indent/indent.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.32 src/usr.bin/indent/indent.c:1.33
--- src/usr.bin/indent/indent.c:1.32	Sun Mar  7 20:52:11 2021
+++ src/usr.bin/indent/indent.c	Mon Mar  8 19:06:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.32 2021/03/07 20:52:11 rillig Exp $	*/
+/*	$NetBSD: indent.c,v 1.33 2021/03/08 19:06:48 rillig Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)indent.c	5.1
 #include <sys/cdefs.h>
 #ifndef lint
 #if defined(__NetBSD__)
-__RCSID("$NetBSD: indent.c,v 1.32 2021/03/07 20:52:11 rillig Exp $");
+__RCSID("$NetBSD: indent.c,v 1.33 2021/03/08 19:06:48 rillig Exp $");
 #elif defined(__FreeBSD__)
 __FBSDID("$FreeBSD: head/usr.bin/indent/indent.c 340138 2018-11-04 19:24:49Z oshogbo $");
 #endif
@@ -192,7 +192,7 @@ main(int argc, char **argv)
     l_token = tokenbuf + bufsize - 5;
     combuf[0] = codebuf[0] = labbuf[0] = ' ';	/* set up code, label, and
 						 * comment buffers */
-    combuf[1] = codebuf[1] = labbuf[1] = '\0';
+    combuf[1] = codebuf[1] = labbuf[1] = tokenbuf[1] = '\0';
     opt.else_if = 1;		/* Default else-if special processing to on */
     s_lab = e_lab = labbuf + 1;
     s_code = e_code = codebuf + 1;

Reply via email to