From: David Levine Date: Fri, 29 Jun 2012 02:11:07 +0000 (-0500) Subject: Simplified getm() a bit, removing a goto. X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=5cf527275a011bac7352394f94176fd9c3251141;p=mmh Simplified getm() a bit, removing a goto. --- diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 6c9fe0e..929b491 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -169,39 +169,30 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) if (host) { mp->m_mbox = getcpy (mbox); mp->m_host = getcpy (host); - } - else { + mp->m_type = + mh_strcasecmp (LocalName(0), mp->m_host) ? NETHOST : LOCALHOST; + } else { if ((pp = strchr(mbox, '!'))) { *pp++ = '\0'; mp->m_mbox = getcpy (pp); mp->m_host = getcpy (mbox); mp->m_type = UUCPHOST; - } - else { + } else { mp->m_nohost = 1; mp->m_mbox = getcpy (mbox); if (route == NULL && dftype == LOCALHOST) { mp->m_host = NULL; mp->m_type = dftype; - } - else - { + } else { mp->m_host = route ? NULL : getcpy (dfhost); mp->m_type = route ? NETHOST : dftype; } } - goto got_host; } /* For alternate mailboxes, m_type gets overwritten in ismymbox () to support wild-card matching. */ - if (wanthost == AD_NHST) - mp->m_type = !mh_strcasecmp (LocalName (0), mp->m_host) - ? LOCALHOST : NETHOST; - else - mp->m_type = mh_strcasecmp (LocalName(0), mp->m_host) ? NETHOST : LOCALHOST; -got_host: ; if (route) mp->m_path = getcpy (route); mp->m_ingrp = ingrp;