Remove more obsd warnings

This commit is contained in:
Erik Ekman 2006-06-05 20:23:51 +00:00
parent b156b7a9e1
commit fb429260a1

3
dns.c
View File

@ -281,11 +281,10 @@ dns_write(int fd, int id, char *buf, int len)
parts = avail / CHUNK; parts = avail / CHUNK;
for (p = 0; p < parts; p++) { for (p = 0; p < parts; p++) {
for (i = 0; i < CHUNK; i++) { for (i = 0; i < CHUNK; i++) {
sprintf(d, "%02X", buf[p*CHUNK + i]); snprintf(d, 3, "%02X", buf[p*CHUNK + i]);
d += 2; d += 2;
} }
*d++ = '.'; *d++ = '.';
strcpy(d, topdomain);
} }
parts = avail % CHUNK; parts = avail % CHUNK;
for (i = 0; i < parts; i++) { for (i = 0; i < parts; i++) {