Module Name: src
Committed By: rin
Date: Tue Nov 21 02:00:29 UTC 2017
Modified Files:
src/external/bsd/nvi/dist/common: conv.c
Log Message:
Fix use of uninitialized variable, found by clang.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/nvi/dist/common/conv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/nvi/dist/common/conv.c
diff -u src/external/bsd/nvi/dist/common/conv.c:1.7 src/external/bsd/nvi/dist/common/conv.c:1.8
--- src/external/bsd/nvi/dist/common/conv.c:1.7 Mon Nov 13 04:21:55 2017
+++ src/external/bsd/nvi/dist/common/conv.c Tue Nov 21 02:00:29 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: conv.c,v 1.7 2017/11/13 04:21:55 rin Exp $ */
+/* $NetBSD: conv.c,v 1.8 2017/11/21 02:00:29 rin Exp $ */
/*-
* Copyright (c) 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -16,7 +16,7 @@
static const char sccsid[] = "Id: conv.c,v 1.27 2001/08/18 21:41:41 skimo Exp (Berkeley) Date: 2001/08/18 21:41:41 ";
#endif /* not lint */
#else
-__RCSID("$NetBSD: conv.c,v 1.7 2017/11/13 04:21:55 rin Exp $");
+__RCSID("$NetBSD: conv.c,v 1.8 2017/11/21 02:00:29 rin Exp $");
#endif
#include <sys/types.h>
@@ -242,7 +242,7 @@ static int
default_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw,
size_t *tolen, const char **pdst, const char *enc)
{
- size_t i, j;
+ size_t i, j = 0;
int offset = 0;
char **tostr = (char **)(void *)&cw->bp1;
size_t *blen = &cw->blen1;