Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/tr Add comment to explain the const issue to avoid f...
details: https://anonhg.NetBSD.org/src/rev/fe36c039ea3c
branches: trunk
changeset: 769382:fe36c039ea3c
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Sep 07 22:59:19 2011 +0000
description:
Add comment to explain the const issue to avoid future trouble.
diffstat:
usr.bin/tr/str.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r baec7e1d9f49 -r fe36c039ea3c usr.bin/tr/str.c
--- a/usr.bin/tr/str.c Wed Sep 07 21:32:07 2011 +0000
+++ b/usr.bin/tr/str.c Wed Sep 07 22:59:19 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: str.c,v 1.14 2011/09/07 18:21:41 riz Exp $ */
+/* $NetBSD: str.c,v 1.15 2011/09/07 22:59:19 joerg Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)str.c 8.2 (Berkeley) 4/28/95";
#endif
-__RCSID("$NetBSD: str.c,v 1.14 2011/09/07 18:21:41 riz Exp $");
+__RCSID("$NetBSD: str.c,v 1.15 2011/09/07 22:59:19 joerg Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -151,6 +151,10 @@
int *set;
} CLASS;
+/*
+ * classes[] is modified in genclass after passing through bsearch,
+ * which would result in silently discarding of const.
+ */
static CLASS classes[] = {
{ "alnum", isalnum, NULL, },
{ "alpha", isalpha, NULL, },
Home |
Main Index |
Thread Index |
Old Index