aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
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);
}