diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-24 20:19:38 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-24 20:19:38 +0000 |
commit | 4ae163392b36468ca86369223f7a9f1416997029 (patch) | |
tree | ab56f10c6336fbad5d23eb038eb1d297d9cfd315 | |
parent | b9848f3b5f126a0b573842b13a6bc72c669e9def (diff) |
strcasecmp instead of tolower
-rw-r--r-- | usr.bin/ssh/readconf.c | 11 | ||||
-rw-r--r-- | usr.bin/ssh/servconf.c | 11 |
2 files changed, 4 insertions, 18 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c index 961da4a06d6..1bb3f337108 100644 --- a/usr.bin/ssh/readconf.c +++ b/usr.bin/ssh/readconf.c @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$Id: readconf.c,v 1.19 1999/11/24 19:53:49 markus Exp $"); +RCSID("$Id: readconf.c,v 1.20 1999/11/24 20:19:37 markus Exp $"); #include "ssh.h" #include "cipher.h" @@ -211,7 +211,7 @@ parse_token(const char *cp, const char *filename, int linenum) unsigned int i; for (i = 0; keywords[i].name; i++) - if (strcmp(cp, keywords[i].name) == 0) + if (strcasecmp(cp, keywords[i].name) == 0) return keywords[i].opcode; fprintf(stderr, "%s: line %d: Bad configuration option: %s\n", @@ -239,13 +239,6 @@ process_config_line(Options *options, const char *host, /* Get the keyword. (Each line is supposed to begin with a keyword). */ cp = strtok(cp, WHITESPACE); - { - char *t = cp; - for (; *t != 0; t++) - if ('A' <= *t && *t <= 'Z') - *t = *t - 'A' + 'a'; /* tolower */ - - } opcode = parse_token(cp, filename, linenum); switch (opcode) { diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 6aaa63572e2..ac0836351f9 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$Id: servconf.c,v 1.27 1999/11/24 19:53:50 markus Exp $"); +RCSID("$Id: servconf.c,v 1.28 1999/11/24 20:19:37 markus Exp $"); #include "ssh.h" #include "servconf.h" @@ -224,7 +224,7 @@ parse_token(const char *cp, const char *filename, unsigned int i; for (i = 0; keywords[i].name; i++) - if (strcmp(cp, keywords[i].name) == 0) + if (strcasecmp(cp, keywords[i].name) == 0) return keywords[i].opcode; fprintf(stderr, "%s: line %d: Bad configuration option: %s\n", @@ -256,13 +256,6 @@ read_server_config(ServerOptions *options, const char *filename) if (!*cp || *cp == '#') continue; cp = strtok(cp, WHITESPACE); - { - char *t = cp; - for (; *t != 0; t++) - if ('A' <= *t && *t <= 'Z') - *t = *t - 'A' + 'a'; /* tolower */ - - } opcode = parse_token(cp, filename, linenum); switch (opcode) { case sBadOption: |