diff options
Diffstat (limited to 'usr.sbin/smtpd/makemap.c')
-rw-r--r-- | usr.sbin/smtpd/makemap.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/usr.sbin/smtpd/makemap.c b/usr.sbin/smtpd/makemap.c index f54bd57b41c..bc5020c7fe3 100644 --- a/usr.sbin/smtpd/makemap.c +++ b/usr.sbin/smtpd/makemap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makemap.c,v 1.54 2015/10/12 07:58:19 deraadt Exp $ */ +/* $OpenBSD: makemap.c,v 1.55 2015/10/17 19:44:07 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -385,7 +385,6 @@ make_aliases(DBT *val, char *text) { struct expandnode xn; char *subrcpt; - char *endp; char *origtext; val->data = NULL; @@ -394,17 +393,11 @@ make_aliases(DBT *val, char *text) origtext = xstrdup(text, "make_aliases"); while ((subrcpt = strsep(&text, ",")) != NULL) { - /* subrcpt: strip initial whitespace. */ - while (isspace((unsigned char)*subrcpt)) - ++subrcpt; + /* subrcpt: strip initial and trailing whitespace. */ + subrcpt = strip(subrcpt); if (*subrcpt == '\0') goto error; - /* subrcpt: strip trailing whitespace. */ - endp = subrcpt + strlen(subrcpt) - 1; - while (subrcpt < endp && isspace((unsigned char)*endp)) - *endp-- = '\0'; - if (! text_to_expandnode(&xn, subrcpt)) goto error; } |