summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gsm/gsm_utils.c2
-rw-r--r--src/logging.c4
-rw-r--r--src/utils.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index 5a4ceb36..61d3f833 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -596,7 +596,7 @@ const char *gsm_band_name(enum gsm_band band)
/*! Parse string name of a GSM band */
enum gsm_band gsm_band_parse(const char* mhz)
{
- while (*mhz && !isdigit(*mhz))
+ while (*mhz && !isdigit((unsigned char)*mhz))
mhz++;
if (*mhz == '\0')
diff --git a/src/logging.c b/src/logging.c
index c8b86b1c..2fb06bae 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -847,7 +847,7 @@ const char *log_vty_command_string()
char name[name_len];
for (j = 0; j < name_len; j++)
- name[j] = tolower(info->cat[i].name[j]);
+ name[j] = tolower((unsigned char)info->cat[i].name[j]);
name[name_len-1] = '\0';
ret = snprintf(str + offset, rem, "%s|", name+1);
@@ -869,7 +869,7 @@ const char *log_vty_command_string()
char loglevel_str[loglevel_str_len];
for (j = 0; j < loglevel_str_len; j++)
- loglevel_str[j] = tolower(loglevel_strs[i].str[j]);
+ loglevel_str[j] = tolower((unsigned char)loglevel_strs[i].str[j]);
loglevel_str[loglevel_str_len-1] = '\0';
ret = snprintf(str + offset, rem, "%s|", loglevel_str);
diff --git a/src/utils.c b/src/utils.c
index a1881f06..1c176f86 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -274,7 +274,7 @@ void osmo_str2lower(char *out, const char *in)
unsigned int i;
for (i = 0; i < strlen(in); i++)
- out[i] = tolower(in[i]);
+ out[i] = tolower((const unsigned char)in[i]);
out[strlen(in)] = '\0';
}
@@ -287,7 +287,7 @@ void osmo_str2upper(char *out, const char *in)
unsigned int i;
for (i = 0; i < strlen(in); i++)
- out[i] = toupper(in[i]);
+ out[i] = toupper((const unsigned char)in[i]);
out[strlen(in)] = '\0';
}
#endif /* HAVE_CTYPE_H */