diff options
| author | Quentin Young <qlyoung@users.noreply.github.com> | 2019-08-06 13:21:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-06 13:21:13 -0400 |
| commit | 3c1c172f02ef13077fc6c1ffa980c1e3d2087263 (patch) | |
| tree | f849ffd1f0f2361e6608385057b1d080ef29b493 /lib/command.c | |
| parent | c8ec87df6e2bc4de3988bd540d369d3589bdeab6 (diff) | |
| parent | 31140be1084a5df22d5ca4a90efeaf46a2298f93 (diff) | |
Merge pull request #4790 from opensourcerouting/ctype-cast
*: fix ctype casts
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/command.c b/lib/command.c index 9049fb9ebc..9dabc2af7e 100644 --- a/lib/command.c +++ b/lib/command.c @@ -289,7 +289,7 @@ vector cmd_make_strvec(const char *string) const char *copy = string; /* skip leading whitespace */ - while (isspace((int)*copy) && *copy != '\0') + while (isspace((unsigned char)*copy) && *copy != '\0') copy++; /* if the entire string was whitespace or a comment, return */ @@ -1934,7 +1934,7 @@ DEFUN(config_domainname, { struct cmd_token *word = argv[1]; - if (!isalpha((int)word->arg[0])) { + if (!isalpha((unsigned char)word->arg[0])) { vty_out(vty, "Please specify string starting with alphabet\n"); return CMD_WARNING_CONFIG_FAILED; } @@ -1968,7 +1968,7 @@ DEFUN (config_hostname, { struct cmd_token *word = argv[1]; - if (!isalnum((int)word->arg[0])) { + if (!isalnum((unsigned char)word->arg[0])) { vty_out(vty, "Please specify string starting with alphabet or number\n"); return CMD_WARNING_CONFIG_FAILED; @@ -2016,7 +2016,7 @@ DEFUN (config_password, return CMD_SUCCESS; } - if (!isalnum((int)argv[idx_8]->arg[0])) { + if (!isalnum((unsigned char)argv[idx_8]->arg[0])) { vty_out(vty, "Please specify string starting with alphanumeric\n"); return CMD_WARNING_CONFIG_FAILED; @@ -2096,7 +2096,7 @@ DEFUN (config_enable_password, } } - if (!isalnum((int)argv[idx_8]->arg[0])) { + if (!isalnum((unsigned char)argv[idx_8]->arg[0])) { vty_out(vty, "Please specify string starting with alphanumeric\n"); return CMD_WARNING_CONFIG_FAILED; |
