Skip to contentSkip to conversation

ctype: constify lookup table

PATCH New Mike Frysinger 2 participants 2 messages Oct 20, 2010 – Nov 28, 2010 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ctype: constify lookup table

---
 include/linux/ctype.h |    2 +-
 lib/ctype.c           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/ctype.h +1 -1
index afa3639..6dec944 100644
@@ -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)])
 
lib/ctype.c +1 -1
index 6ed0468..dffe563 100644
@@ -29,7 +29,7 @@
 
 #include <linux/ctype.h>
 
-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 */
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 ctype: constify lookup table

Dear Mike Frysinger,

Quoted 5 lines · In message <[email protected]> you wrote:
---
 include/linux/ctype.h |    2 +-
 lib/ctype.c           |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Either one of us, by himself, is expendable.  Both of us are not.
	-- Kirk, "The Devil in the Dark", stardate 3196.1