Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/indent indent: fix printing of uninitialized 'token'...
details: https://anonhg.NetBSD.org/src/rev/e95573045fad
branches: trunk
changeset: 953421:e95573045fad
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Mar 08 19:06:48 2021 +0000
description:
indent: fix printing of uninitialized 'token' in debug output
diffstat:
usr.bin/indent/indent.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d83a3ec44e98 -r e95573045fad usr.bin/indent/indent.c
--- a/usr.bin/indent/indent.c Mon Mar 08 18:22:16 2021 +0000
+++ b/usr.bin/indent/indent.c Mon Mar 08 19:06:48 2021 +0000
@@ -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 @@
#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 @@
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;
Home |
Main Index |
Thread Index |
Old Index