aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-01-18 18:46:59 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-01-18 18:46:59 +0000
commitc052c34a057f079265c748259c1b2b5893596ba1 (patch)
treef641352f91a0f355640d4b7423e38e663b4c5cd9
parent82d439ab4b351b4193521428fa449f392c8ec0ac (diff)
downloadfetchmail-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.h6
-rw-r--r--mxget.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/mx.h b/mx.h
index b32a7ef4..0a28f2b0 100644
--- a/mx.h
+++ b/mx.h
@@ -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;
diff --git a/mxget.c b/mxget.c
index 726417b1..876b2c88 100644
--- a/mxget.c
+++ b/mxget.c
@@ -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);