Module Name: src Committed By: joerg Date: Wed Sep 7 22:59:19 UTC 2011
Modified Files: src/usr.bin/tr: str.c Log Message: Add comment to explain the const issue to avoid future trouble. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/tr/str.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/tr/str.c diff -u src/usr.bin/tr/str.c:1.14 src/usr.bin/tr/str.c:1.15 --- src/usr.bin/tr/str.c:1.14 Wed Sep 7 18:21:41 2011 +++ src/usr.bin/tr/str.c Wed Sep 7 22:59:19 2011 @@ -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, },