SCCS-vsn: usr.sbin/sendmail/src/domain.c 6.20
#ifndef lint
#ifdef NAMED_BIND
#ifndef lint
#ifdef NAMED_BIND
-static char sccsid[] = "@(#)domain.c 6.19.1.1 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c 6.20 (Berkeley) %G% (with name server)";
-static char sccsid[] = "@(#)domain.c 6.19.1.1 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c 6.20 (Berkeley) %G% (without name server)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
return (FALSE);
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
return (FALSE);
- for (cp = host, n = 0; *cp; cp++)
- if (*cp == '.')
- n++;
-
/*
** Initialize domain search list. If there is at least one
** dot in the name, search the unmodified name first so we
/*
** Initialize domain search list. If there is at least one
** dot in the name, search the unmodified name first so we
** list by tearing apart the host name.
*/
** list by tearing apart the host name.
*/
+cnameloop:
+ for (cp = host, n = 0; *cp; cp++)
+ if (*cp == '.')
+ n++;
+
dp = searchlist;
if (n > 0)
*dp++ = "";
dp = searchlist;
if (n > 0)
*dp++ = "";
** Now run through the search list for the name in question.
*/
** Now run through the search list for the name in question.
*/
-cnameloop:
- dp = searchlist;
mxmatch = NULL;
qtype = T_ANY;
mxmatch = NULL;
qtype = T_ANY;