summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-12-21 14:45:46 +1100
committerDamien Miller <djm@mindrot.org>2001-12-21 14:45:46 +1100
commit9f0f5c64bc4b6144e3fed6a7f538f7c21819a492 (patch)
treef79317ab211f59181a61b526f566e9c8cfe70c73 /match.c
parent89681214ca2f50a1b1ed6164c3afe1ce14995ffc (diff)
- deraadt@cvs.openbsd.org 2001/12/19 07:18:56
[auth1.c auth2.c auth2-chall.c auth-bsdauth.c auth.c authfile.c auth.h] [auth-krb4.c auth-rhosts.c auth-skey.c bufaux.c canohost.c channels.c] [cipher.c clientloop.c compat.c compress.c deattack.c key.c log.c mac.c] [match.c misc.c nchan.c packet.c readconf.c rijndael.c rijndael.h scard.c] [servconf.c servconf.h serverloop.c session.c sftp.c sftp-client.c] [sftp-glob.c sftp-int.c sftp-server.c ssh-add.c ssh-agent.c ssh.c] [sshconnect1.c sshconnect2.c sshconnect.c sshd.8 sshd.c sshd_config] [ssh-keygen.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c] basic KNF done while i was looking for something else
Diffstat (limited to 'match.c')
-rw-r--r--match.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/match.c b/match.c
index ca4d92c40..9e56989cc 100644
--- a/match.c
+++ b/match.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: match.c,v 1.15 2001/12/05 16:54:51 markus Exp $"); 38RCSID("$OpenBSD: match.c,v 1.16 2001/12/19 07:18:56 deraadt Exp $");
39 39
40#include "match.h" 40#include "match.h"
41#include "xmalloc.h" 41#include "xmalloc.h"
@@ -133,10 +133,10 @@ match_pattern_list(const char *string, const char *pattern, u_int len,
133 * subpattern to lowercase. 133 * subpattern to lowercase.
134 */ 134 */
135 for (subi = 0; 135 for (subi = 0;
136 i < len && subi < sizeof(sub) - 1 && pattern[i] != ','; 136 i < len && subi < sizeof(sub) - 1 && pattern[i] != ',';
137 subi++, i++) 137 subi++, i++)
138 sub[subi] = dolower && isupper(pattern[i]) ? 138 sub[subi] = dolower && isupper(pattern[i]) ?
139 tolower(pattern[i]) : pattern[i]; 139 tolower(pattern[i]) : pattern[i];
140 /* If subpattern too long, return failure (no match). */ 140 /* If subpattern too long, return failure (no match). */
141 if (subi >= sizeof(sub) - 1) 141 if (subi >= sizeof(sub) - 1)
142 return 0; 142 return 0;
@@ -239,7 +239,7 @@ match_list(const char *client, const char *server, u_int *next)
239 s = sp = xstrdup(server); 239 s = sp = xstrdup(server);
240 240
241 for ((p = strsep(&sp, SEP)), i=0; p && *p != '\0'; 241 for ((p = strsep(&sp, SEP)), i=0; p && *p != '\0';
242 (p = strsep(&sp, SEP)), i++) { 242 (p = strsep(&sp, SEP)), i++) {
243 if (i < MAX_PROP) 243 if (i < MAX_PROP)
244 sproposals[i] = p; 244 sproposals[i] = p;
245 else 245 else
@@ -248,7 +248,7 @@ match_list(const char *client, const char *server, u_int *next)
248 nproposals = i; 248 nproposals = i;
249 249
250 for ((p = strsep(&cp, SEP)), i=0; p && *p != '\0'; 250 for ((p = strsep(&cp, SEP)), i=0; p && *p != '\0';
251 (p = strsep(&cp, SEP)), i++) { 251 (p = strsep(&cp, SEP)), i++) {
252 for (j = 0; j < nproposals; j++) { 252 for (j = 0; j < nproposals; j++) {
253 if (strcmp(p, sproposals[j]) == 0) { 253 if (strcmp(p, sproposals[j]) == 0) {
254 ret = xstrdup(p); 254 ret = xstrdup(p);