From 2a119b55033ceb0eb36b0228ace7504f36b85558 Mon Sep 17 00:00:00 2001 From: Eric Allman Date: Sat, 11 Oct 1980 20:57:13 -0800 Subject: [PATCH] cleaned up algorithm slightly SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 1.4 --- usr/src/usr.sbin/sendmail/src/parseaddr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr/src/usr.sbin/sendmail/src/parseaddr.c b/usr/src/usr.sbin/sendmail/src/parseaddr.c index 59c5a31bca..d897dbdc9b 100644 --- a/usr/src/usr.sbin/sendmail/src/parseaddr.c +++ b/usr/src/usr.sbin/sendmail/src/parseaddr.c @@ -2,7 +2,7 @@ # include # include "dlvrmail.h" -static char SccsId[] = "@(#)parseaddr.c 1.3 %G%"; +static char SccsId[] = "@(#)parseaddr.c 1.4 %G%"; /* ** PARSE -- Parse an address @@ -348,7 +348,10 @@ prescan(addr, buf, buflim, delim) else if (c == delim) break; else if (c == '(') + { cmntcnt++; + continue; + } else if (c == ')') { if (cmntcnt <= 0) @@ -362,8 +365,6 @@ prescan(addr, buf, buflim, delim) continue; } } - if (cmntcnt > 0) - continue; else if (c == '<') { brccnt++; @@ -390,7 +391,7 @@ prescan(addr, buf, buflim, delim) /* ** Turn "at" into "@", - ** but only if "at" is a word in and to itself. + ** but only if "at" is a word. ** By the way, I violate the ARPANET RFC-733 ** standard here, by assuming that 'space' delimits ** atoms. I assume that is just a mistake, since -- 2.20.1