diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-25 18:25:20 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-25 18:25:20 +0000 |
commit | 443c351724ef9b9eff3327ed13940207ddf3838e (patch) | |
tree | c47cd89748a94cfbcb7a1599629ff17c88f55e6e /driver.c | |
parent | 4fbbabc2705e0c7320516b673f855494d48ec81d (diff) | |
download | fetchmail-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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); } |