From: Kovarththanan Rajaratnam Date: Sat, 20 Feb 2010 07:56:59 +0000 (+0100) Subject: strcasecmp.c: mark array as const X-Git-Tag: tcpdump-4.1.0~8^2~2 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/5951ca70d25613c1fca737b5462bb5b39cc13c6f strcasecmp.c: mark array as const --- diff --git a/strcasecmp.c b/strcasecmp.c index f19ccf54..5504e0af 100644 --- a/strcasecmp.c +++ b/strcasecmp.c @@ -28,7 +28,7 @@ static const char rcsid[] _U_ = * together for a case independent comparison. The mappings are * based upon ascii character sequences. */ -static u_char charmap[] = { +static const u_char charmap[] = { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', @@ -67,7 +67,7 @@ int strcasecmp(s1, s2) const char *s1, *s2; { - register u_char *cm = charmap, + register const u_char *cm = charmap, *us1 = (u_char *)s1, *us2 = (u_char *)s2; @@ -82,7 +82,7 @@ strncasecmp(s1, s2, n) const char *s1, *s2; register int n; { - register u_char *cm = charmap, + register const u_char *cm = charmap, *us1 = (u_char *)s1, *us2 = (u_char *)s2;