diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-01-18 18:46:59 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-01-18 18:46:59 +0000 |
commit | c052c34a057f079265c748259c1b2b5893596ba1 (patch) | |
tree | f641352f91a0f355640d4b7423e38e663b4c5cd9 | |
parent | 82d439ab4b351b4193521428fa449f392c8ec0ac (diff) | |
download | fetchmail-c052c34a057f079265c748259c1b2b5893596ba1.tar.gz fetchmail-c052c34a057f079265c748259c1b2b5893596ba1.tar.bz2 fetchmail-c052c34a057f079265c748259c1b2b5893596ba1.zip |
Change mxget from unsigned char * to char *.
svn path=/trunk/; revision=1596
-rw-r--r-- | mx.h | 6 | ||||
-rw-r--r-- | mxget.c | 7 |
2 files changed, 6 insertions, 7 deletions
@@ -2,11 +2,11 @@ struct mxentry { - unsigned char *name; - int pref; + char *name; + int pref; }; -extern struct mxentry * getmxrecords(const unsigned char *); +extern struct mxentry * getmxrecords(const char *); /* some versions of FreeBSD should declare this but don't */ extern int h_errno; @@ -40,10 +40,10 @@ /* minimum possible size of MX record in packet */ #define MIN_MX_SIZE 8 /* corresp to "a.com 0" w/ terminating space */ -struct mxentry *getmxrecords(const unsigned char *name) +struct mxentry *getmxrecords(const char *name) /* get MX records for given host */ { - unsigned char answer[PACKETSZ], *eom, *cp, *bp; + char answer[PACKETSZ], *eom, *cp, *bp; int n, ancount, qdcount, buflen, type, pref, ind; static struct mxentry pmx[(PACKETSZ - HFIXEDSZ) / MIN_MX_SIZE]; static char MXHostBuf[PACKETSZ - HFIXEDSZ]; @@ -51,8 +51,7 @@ struct mxentry *getmxrecords(const unsigned char *name) pmx->name = (char *)NULL; pmx->pref = -1; - n = res_search((char *)name, - C_IN,T_MX, (unsigned char*)&answer, sizeof(answer)); + n = res_search(name, C_IN,T_MX, &answer, sizeof(answer)); if (n == -1) return((struct mxentry *)NULL); |