summaryrefslogtreecommitdiff
path: root/extra/config
diff options
context:
space:
mode:
Diffstat (limited to 'extra/config')
-rw-r--r--extra/config/conf.c6
-rw-r--r--extra/config/confdata.c2
-rw-r--r--extra/config/mconf.c3
-rw-r--r--extra/config/symbol.c6
4 files changed, 9 insertions, 8 deletions
diff --git a/extra/config/conf.c b/extra/config/conf.c
index 910d52ce6..6bc5de943 100644
--- a/extra/config/conf.c
+++ b/extra/config/conf.c
@@ -78,7 +78,7 @@ static void strip(char *str)
char *p = str;
int l;
- while ((isspace(*p)))
+ while ((isspace((int)*p)))
p++;
l = strlen(p);
if (p != str)
@@ -86,7 +86,7 @@ static void strip(char *str)
if (!l)
return;
p = str + l - 1;
- while ((isspace(*p)))
+ while ((isspace((int)*p)))
*p-- = 0;
}
@@ -358,7 +358,7 @@ static int conf_choice(struct menu *menu)
continue;
}
if (line[0]) {
- len = strlen(line) - 1;
+ len = strlen(line);
line[len] = 0;
def_menu = NULL;
diff --git a/extra/config/confdata.c b/extra/config/confdata.c
index d3df3ab34..9e413b4a3 100644
--- a/extra/config/confdata.c
+++ b/extra/config/confdata.c
@@ -40,7 +40,7 @@ static char *conf_expand_value(const char *in)
strncat(res_value, in, src - in);
src++;
dst = name;
- while (isalnum(*src) || *src == '_')
+ while (isalnum((int)*src) || *src == '_')
*dst++ = *src++;
*dst = 0;
sym = sym_lookup(name, 0);
diff --git a/extra/config/mconf.c b/extra/config/mconf.c
index 2ebc18819..dad2f5f9d 100644
--- a/extra/config/mconf.c
+++ b/extra/config/mconf.c
@@ -8,6 +8,7 @@
#include <sys/ioctl.h>
#include <sys/wait.h>
+#include <sys/termios.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@@ -443,7 +444,7 @@ static void conf(struct menu *menu)
if (!type)
continue;
- for (i = 0; input_buf[i] && !isspace(input_buf[i]); i++)
+ for (i = 0; input_buf[i] && !isspace((int)input_buf[i]); i++)
;
if (i >= sizeof(active_entry))
i = sizeof(active_entry) - 1;
diff --git a/extra/config/symbol.c b/extra/config/symbol.c
index 7ec2ff48b..f2d0015de 100644
--- a/extra/config/symbol.c
+++ b/extra/config/symbol.c
@@ -404,12 +404,12 @@ bool sym_string_valid(struct symbol *sym, const char *str)
ch = *str++;
if (ch == '-')
ch = *str++;
- if (!isdigit(ch))
+ if (!isdigit((int)ch))
return false;
if (ch == '0' && *str != 0)
return false;
while ((ch = *str++)) {
- if (!isdigit(ch))
+ if (!isdigit((int)ch))
return false;
}
return true;
@@ -418,7 +418,7 @@ bool sym_string_valid(struct symbol *sym, const char *str)
str += 2;
ch = *str++;
do {
- if (!isxdigit(ch))
+ if (!isxdigit((int)ch))
return false;
} while ((ch = *str++));
return true;