Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen Don't declare a variable inside a "for" constru...
details: https://anonhg.NetBSD.org/src/rev/d09275661514
branches: trunk
changeset: 785075:d09275661514
user: tron <tron%NetBSD.org@localhost>
date: Wed Feb 20 19:59:34 2013 +0000
description:
Don't declare a variable inside a "for" construct because it breaks the
tool build which doesn't use C99.
diffstat:
lib/libc/gen/vis.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r f95ff8eb9df3 -r d09275661514 lib/libc/gen/vis.c
--- a/lib/libc/gen/vis.c Wed Feb 20 19:49:26 2013 +0000
+++ b/lib/libc/gen/vis.c Wed Feb 20 19:59:34 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vis.c,v 1.57 2013/02/20 18:40:49 christos Exp $ */
+/* $NetBSD: vis.c,v 1.58 2013/02/20 19:59:34 tron Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.57 2013/02/20 18:40:49 christos Exp $");
+__RCSID("$NetBSD: vis.c,v 1.58 2013/02/20 19:59:34 tron Exp $");
#endif /* LIBC_SCCS and not lint */
#ifdef __FBSDID
__FBSDID("$FreeBSD$");
@@ -302,7 +302,8 @@
return NULL;
if (mbstowcs(dst, src, len) == (size_t)-1) {
- for (size_t i = 0; i < len; i++)
+ size_t i;
+ for (i = 0; i < len; i++)
dst[i] = (wint_t)(u_char)src[i];
d = dst + len;
} else
Home |
Main Index |
Thread Index |
Old Index