aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-25 18:25:20 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-25 18:25:20 +0000
commit443c351724ef9b9eff3327ed13940207ddf3838e (patch)
treec47cd89748a94cfbcb7a1599629ff17c88f55e6e /driver.c
parent4fbbabc2705e0c7320516b673f855494d48ec81d (diff)
downloadfetchmail-443c351724ef9b9eff3327ed13940207ddf3838e.tar.gz
fetchmail-443c351724ef9b9eff3327ed13940207ddf3838e.tar.bz2
fetchmail-443c351724ef9b9eff3327ed13940207ddf3838e.zip
Clean up the getmxrecords interface.
svn path=/trunk/; revision=380
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/driver.c b/driver.c
index b4a4048f..d008443d 100644
--- a/driver.c
+++ b/driver.c
@@ -343,12 +343,12 @@ struct hostrec *queryctl;
*/
for (i = 0; i < MX_RETRIES; i++)
{
- struct mxentry mxresp[32];
+ struct mxentry *mxrecords, *mxp;
int j;
- n = getmxrecords(name, sizeof(mxresp)/sizeof(struct mxentry), mxresp);
+ mxrecords = getmxrecords(name);
- if (n == -1)
+ if (mxrecords == (struct mxentry *)NULL)
if (h_errno == TRY_AGAIN)
{
sleep(1);
@@ -357,8 +357,8 @@ struct hostrec *queryctl;
else
break;
- for (j = 0; j < n; j++)
- if (strcmp(name, mxresp[i].name) == 0)
+ for (mxp = mxrecords; mxp->name; mxp++)
+ if (strcmp(name, mxp->name) == 0)
return(TRUE);
}