summaryrefslogtreecommitdiff
path: root/src/rc
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-04-17 10:19:58 +0000
committerRoy Marples <roy@marples.name>2008-04-17 10:19:58 +0000
commitf0aacec02eb04f1843cc5c729fd5510c2342660c (patch)
tree6f2ed637801be469663811f92e0833714ff4eb22 /src/rc
parent57e1dd7389229718b170d5c6fe52b0b051729801 (diff)
downloadopenrc-f0aacec02eb04f1843cc5c729fd5510c2342660c.tar.gz
openrc-f0aacec02eb04f1843cc5c729fd5510c2342660c.tar.bz2
openrc-f0aacec02eb04f1843cc5c729fd5510c2342660c.tar.xz
Cast to unsigned char for ctype calls.
Diffstat (limited to 'src/rc')
-rw-r--r--src/rc/rc-applets.c4
-rw-r--r--src/rc/rc-logger.c2
-rw-r--r--src/rc/rc-misc.c4
-rw-r--r--src/rc/rc.c2
-rw-r--r--src/rc/start-stop-daemon.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c
index d434be4..60c0c27 100644
--- a/src/rc/rc-applets.c
+++ b/src/rc/rc-applets.c
@@ -58,7 +58,7 @@ static int syslog_decode(char *name, CODE *codetab)
{
CODE *c;
- if (isdigit((int) *name))
+ if (isdigit((unsigned char)*name))
return atoi(name);
for (c = codetab; c->c_name; c++)
@@ -351,7 +351,7 @@ static int do_shell_var(int argc, char **argv)
putchar(' ');
while (*p) {
- c = *p++;
+ c = (unsigned char)*p++;
if (! isalnum(c))
c = '_';
putchar(c);
diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c
index 96b7bb7..8f62eba 100644
--- a/src/rc/rc-logger.c
+++ b/src/rc/rc-logger.c
@@ -103,7 +103,7 @@ static void write_log(int logfd, const char *buffer, size_t bytes)
continue;
}
- if (! in_term || isalpha((int) *p))
+ if (! in_term || isalpha((unsigned char)*p))
in_escape = in_term = false;
cont:
p++;
diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c
index 6e94ad6..85140aa 100644
--- a/src/rc/rc-misc.c
+++ b/src/rc/rc-misc.c
@@ -93,8 +93,8 @@ char *rc_conf_value(const char *setting)
TAILQ_FOREACH(s, rc_conf, entries) {
p = s->value;
while (p && *p && *p != '=') {
- if (isupper((int) *p))
- *p = tolower((int) *p);
+ if (isupper((unsigned char)*p))
+ *p = tolower((unsigned char)*p);
p++;
}
}
diff --git a/src/rc/rc.c b/src/rc/rc.c
index dee0732..b814923 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -582,7 +582,7 @@ static void do_coldplug(void)
strncmp(d->d_name, "ums", 3) == 0)
{
p = d->d_name + 3;
- if (p && isdigit((int) *p)) {
+ if (p && isdigit((unsigned char)*p)) {
l = strlen("moused.") + strlen(d->d_name) + 1;
service = xmalloc(sizeof(char) * l);
snprintf (service, l, "moused.%s", d->d_name);
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index d96e5f6..24505da 100644
--- a/src/rc/start-stop-daemon.c
+++ b/src/rc/start-stop-daemon.c
@@ -190,7 +190,7 @@ static SCHEDULEITEM *parse_schedule_item(const char *string)
item->gotoitem = NULL;
if (strcmp(string,"forever") == 0)
item->type = SC_FOREVER;
- else if (isdigit((int) string[0])) {
+ else if (isdigit((unsigned char)string[0])) {
item->type = SC_TIMEOUT;
errno = 0;
if (sscanf(string, "%d", &item->value) != 1)