From: Mike Frysinger Date: Wed, 20 Oct 2010 11:17:45 +0000 (-0400) Subject: ctype: constify lookup table X-Git-Tag: v2011.03-rc1~55^2~38 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=543f0a3819a9af130f3f80a660099fad8d2d4b8e;p=karo-tx-uboot.git ctype: constify lookup table Signed-off-by: Mike Frysinger --- diff --git a/include/linux/ctype.h b/include/linux/ctype.h index afa3639229..6dec944a37 100644 --- a/include/linux/ctype.h +++ b/include/linux/ctype.h @@ -15,7 +15,7 @@ #define _X 0x40 /* hex digit */ #define _SP 0x80 /* hard space (0x20) */ -extern unsigned char _ctype[]; +extern const unsigned char _ctype[]; #define __ismask(x) (_ctype[(int)(unsigned char)(x)]) diff --git a/lib/ctype.c b/lib/ctype.c index 6ed0468a21..dffe563724 100644 --- a/lib/ctype.c +++ b/lib/ctype.c @@ -29,7 +29,7 @@ #include -unsigned char _ctype[] = { +const unsigned char _ctype[] = { _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ _C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */ _C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */