summaryrefslogtreecommitdiff
path: root/minires
diff options
context:
space:
mode:
authorDamien Neil <source@isc.org>2000-12-02 00:10:20 +0000
committerDamien Neil <source@isc.org>2000-12-02 00:10:20 +0000
commit78c636eb938d7f172b1914fe5c725d9d4c252001 (patch)
tree69296e1ed63e4ebc7f8af91b7c7da67470f64d63 /minires
parent81beacfb83c4004329a504d1a6f091950f476580 (diff)
downloadisc-dhcp-78c636eb938d7f172b1914fe5c725d9d4c252001.tar.gz
Changed the variable 'n' in res_nmkupdate() from an unsigned to an int.
(There are circumstances under which a negative value may be assigned to it.) This mirrors the state of the BIND 8 code.
Diffstat (limited to 'minires')
-rw-r--r--minires/res_mkupdate.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/minires/res_mkupdate.c b/minires/res_mkupdate.c
index 3e86dfae..574bce0a 100644
--- a/minires/res_mkupdate.c
+++ b/minires/res_mkupdate.c
@@ -21,7 +21,7 @@
*/
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_mkupdate.c,v 1.5 2000/07/17 20:51:14 mellon Exp $";
+static const char rcsid[] = "$Id: res_mkupdate.c,v 1.6 2000/12/02 00:10:20 neild Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -89,8 +89,7 @@ res_nmkupdate(res_state statp,
ns_updrec *rrecp_start = rrecp_in;
HEADER *hp;
u_char *cp, *sp1, *sp2, *startp, *endp;
- int i, soanum, multiline;
- unsigned n;
+ int n, i, soanum, multiline;
ns_updrec *rrecp;
struct in_addr ina;
char buf2[MAXDNAME];
@@ -387,7 +386,7 @@ res_nmkupdate(res_state statp,
return (-1);
ShrinkBuffer(n+1);
*cp++ = n;
- memcpy(cp, buf2, n);
+ memcpy(cp, buf2, (unsigned)n);
cp += n;
}
break;
@@ -403,7 +402,7 @@ res_nmkupdate(res_state statp,
return (-1);
ShrinkBuffer(n+1);
*cp++ = n;
- memcpy(cp, buf2, n);
+ memcpy(cp, buf2, (unsigned)n);
cp += n;
}
break;
@@ -416,7 +415,7 @@ res_nmkupdate(res_state statp,
return (-1);
ShrinkBuffer(n+1);
*cp++ = n;
- memcpy(cp, buf2, n);
+ memcpy(cp, buf2, (unsigned)n);
cp += n;
break;
case T_ISDN:
@@ -428,7 +427,7 @@ res_nmkupdate(res_state statp,
return (-1);
ShrinkBuffer(n+1);
*cp++ = n;
- memcpy(cp, buf2, n);
+ memcpy(cp, buf2, (unsigned)n);
cp += n;
if ((n = getstr_str(buf2, sizeof buf2, &startp,
endp)) < 0)
@@ -437,7 +436,7 @@ res_nmkupdate(res_state statp,
return (-1);
ShrinkBuffer(n+1);
*cp++ = n;
- memcpy(cp, buf2, n);
+ memcpy(cp, buf2, (unsigned)n);
cp += n;
break;
#if 0