Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/tr Remove newly-introduced const qualifier from stat...



details:   https://anonhg.NetBSD.org/src/rev/17a69444aad2
branches:  trunk
changeset: 769377:17a69444aad2
user:      riz <riz%NetBSD.org@localhost>
date:      Wed Sep 07 18:21:41 2011 +0000

description:
Remove newly-introduced const qualifier from static CLASS classes[],
as CLASS->set gets changed in genclass().  Fixes a segfault doing:

tr '[:lower:]' '[:upper:]'

on (at least) amd64.

diffstat:

 usr.bin/tr/str.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 290cc11a9c1a -r 17a69444aad2 usr.bin/tr/str.c
--- a/usr.bin/tr/str.c  Wed Sep 07 17:55:12 2011 +0000
+++ b/usr.bin/tr/str.c  Wed Sep 07 18:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: str.c,v 1.13 2011/09/06 18:33:46 joerg Exp $   */
+/*     $NetBSD: str.c,v 1.14 2011/09/07 18:21:41 riz 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.13 2011/09/06 18:33:46 joerg Exp $");
+__RCSID("$NetBSD: str.c,v 1.14 2011/09/07 18:21:41 riz Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -151,7 +151,7 @@
        int *set;
 } CLASS;
 
-static const CLASS classes[] = {
+static CLASS classes[] = {
        { "alnum",  isalnum,  NULL, },
        { "alpha",  isalpha,  NULL, },
        { "blank",  isblank,  NULL, },



Home | Main Index | Thread Index | Old Index