summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2019-08-06 19:21:13 +0200
committerGitHub <noreply@github.com>2019-08-06 19:21:13 +0200
commit3c1c172f02ef13077fc6c1ffa980c1e3d2087263 (patch)
treef849ffd1f0f2361e6608385057b1d080ef29b493 /vtysh
parentall: remove logical-router functionality (#4774) (diff)
parentdebian: add .gitignore file (diff)
downloadfrr-3c1c172f02ef13077fc6c1ffa980c1e3d2087263.tar.xz
frr-3c1c172f02ef13077fc6c1ffa980c1e3d2087263.zip
Merge pull request #4790 from opensourcerouting/ctype-cast
*: fix ctype casts
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 7a1e82e6d..cec5675e0 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -668,11 +668,11 @@ static char *trim(char *s)
return s;
end = s + size - 1;
- while (end >= s && isspace((int)*end))
+ while (end >= s && isspace((unsigned char)*end))
end--;
*(end + 1) = '\0';
- while (*s && isspace((int)*s))
+ while (*s && isspace((unsigned char)*s))
s++;
return s;
@@ -979,7 +979,7 @@ static int vtysh_process_questionmark(const char *input, int input_len)
if (vline == NULL) {
vline = vector_init(1);
vector_set(vline, NULL);
- } else if (input_len && isspace((int)input[input_len - 1]))
+ } else if (input_len && isspace((unsigned char)input[input_len - 1]))
vector_set(vline, NULL);
describe = cmd_describe_command(vline, vty, &ret);
@@ -1127,7 +1127,8 @@ static char *command_generator(const char *text, int state)
if (vline == NULL)
return NULL;
- if (rl_end && isspace((int)rl_line_buffer[rl_end - 1]))
+ if (rl_end &&
+ isspace((unsigned char)rl_line_buffer[rl_end - 1]))
vector_set(vline, NULL);
matched = cmd_complete_command(vline, vty, &complete_status);