diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-08-08 00:02:23 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-08-08 00:02:23 +0000 |
commit | c5e18c2f33641d513a85b62af9eb11c00cac8c9c (patch) | |
tree | 529768b401fcc9fe909124f1a4190e12fe87e925 /usr.sbin/smtpd/aliases.c | |
parent | 22b9719d0a6091d299d5b64ba0f389a3a52b181b (diff) |
import some changes from portable smtpd to reduce the delta between both.
this commit contains mostly missing casts and cosmethic changes, do not
expect to build this anywhere but on OpenBSD, it does not contain any of
the portable glue.
Diffstat (limited to 'usr.sbin/smtpd/aliases.c')
-rw-r--r-- | usr.sbin/smtpd/aliases.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c index 8208af69d40..3427ce4bb2e 100644 --- a/usr.sbin/smtpd/aliases.c +++ b/usr.sbin/smtpd/aliases.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aliases.c,v 1.18 2009/05/13 21:20:55 jacekm Exp $ */ +/* $OpenBSD: aliases.c,v 1.19 2009/08/08 00:02:22 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -362,7 +362,7 @@ alias_is_username(struct alias *alias, char *line, size_t len) return 0; while (*line) { - if (!isalnum(*line) && + if (!isalnum((int)*line) && *line != '_' && *line != '.' && *line != '-') return 0; ++line; @@ -395,7 +395,7 @@ alias_is_address(struct alias *alias, char *line, size_t len) while (*line) { char allowedset[] = "!#$%*/?|^{}`~&'+-=_."; - if (!isalnum(*line) && + if (!isalnum((int)*line) && strchr(allowedset, *line) == NULL) return 0; ++line; @@ -403,7 +403,7 @@ alias_is_address(struct alias *alias, char *line, size_t len) while (*domain) { char allowedset[] = "-."; - if (!isalnum(*domain) && + if (!isalnum((int)*domain) && strchr(allowedset, *domain) == NULL) return 0; ++domain; |