INN commit: trunk (frontends/inews.c lib/innconf.c)
INN Commit
rra at isc.org
Mon Aug 22 08:50:27 UTC 2011
Date: Monday, August 22, 2011 @ 01:50:27
Author: iulius
Revision: 9365
Cast the argument to toupper()
Following the previous commit dealing with tolower(), cast the argument
to an unsigned char.
Modified:
trunk/frontends/inews.c
trunk/lib/innconf.c
-------------------+
frontends/inews.c | 2 +-
lib/innconf.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
Modified: frontends/inews.c
===================================================================
--- frontends/inews.c 2011-08-21 23:23:26 UTC (rev 9364)
+++ frontends/inews.c 2011-08-22 08:50:27 UTC (rev 9365)
@@ -238,7 +238,7 @@
}
/* See if it's a known header. */
- c = islower((unsigned char) *p) ? toupper(*p) : *p;
+ c = islower((unsigned char) *p) ? toupper((unsigned char) *p) : *p;
for (hp = Table; hp < ARRAY_END(Table); hp++)
if (c == hp->Name[0]
&& p[hp->Size] == ':'
Modified: lib/innconf.c
===================================================================
--- lib/innconf.c 2011-08-21 23:23:26 UTC (rev 9364)
+++ lib/innconf.c 2011-08-22 08:50:27 UTC (rev 9365)
@@ -666,7 +666,7 @@
case INNCONF_QUOTE_SHELL:
upper = xstrdup(key);
for (p = upper; *p != '\0'; p++)
- *p = toupper(*p);
+ *p = toupper((unsigned char) *p);
fprintf(file, "%s=%s; export %s;\n", upper, value ? "true" : "false",
upper);
free(upper);
@@ -697,7 +697,7 @@
case INNCONF_QUOTE_SHELL:
upper = xstrdup(key);
for (p = upper; *p != '\0'; p++)
- *p = toupper(*p);
+ *p = toupper((unsigned char) *p);
fprintf(file, "%s=%ld; export %s;\n", upper, value, upper);
free(upper);
break;
@@ -727,7 +727,7 @@
case INNCONF_QUOTE_SHELL:
upper = xstrdup(key);
for (p = upper; *p != '\0'; p++)
- *p = toupper(*p);
+ *p = toupper((unsigned char) *p);
fprintf(file, "%s=%lu; export %s;\n", upper, value, upper);
free(upper);
break;
@@ -767,7 +767,7 @@
}
upper = xstrdup(key);
for (p = upper; *p != '\0'; p++)
- *p = toupper(*p);
+ *p = toupper((unsigned char) *p);
fprintf(file, "%s='", upper);
for (letter = value; letter != NULL && *letter != '\0'; letter++) {
if (*letter == '\'')
@@ -845,7 +845,7 @@
}
upper = xstrdup(key);
for (p = upper; *p != '\0'; p++)
- *p = toupper(*p);
+ *p = toupper((unsigned char) *p);
/* For interoperability reasons, we return a space-separated string
* representing an array (pure Bourne shell does not have the notion
* of an array for instance). */
More information about the inn-committers
mailing list