namelen = strlen(name);
for (idl = lead_server->akalist; idl; idl = idl->next)
{
- char *ep;
+ const char *ep;
/*
* Test is >= here because str_in_list() should have caught the
*/
if (strlen(idl->id) >= namelen)
continue;
- ep = (char *)name + (namelen - strlen(idl->id));
+ ep = name + (namelen - strlen(idl->id));
/* a suffix led by . must match */
if (ep[-1] == '.' && !strcasecmp(ep, idl->id))
return(TRUE);
switch (e)
{
case EAI_NONAME: /* specified host is unknown */
+#ifdef EAI_NODATA
+ /* EAI_NODATA was in the older RFC-2553, but that got
+ * obsoleted by RFC-3493 - there, EAI_NODATA is no longer
+ * valid, and modern operating systems no longer issue this
+ * error code. libesmtp/getaddrinfo.?, however, still does.
+ * (This was reported to Brian Stafford 2013-02-03.)
+ */
+ case EAI_NODATA: /* specified host is unknown */
+#endif
break;
default: