2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00
This commit is contained in:
Bob Halley
1999-01-09 02:39:39 +00:00
parent 5aa416c8bd
commit 08dbab20ef
4 changed files with 7 additions and 7 deletions

View File

@@ -102,12 +102,12 @@ my_recv(isc_task_t *task, isc_event_t *event)
if (strcmp(event->arg, "so2")) {
region = dev->region;
strcpy(buf, "\r\nReceived: ");
strncat(buf, region.base, region.length);
strncat(buf, (char *)region.base, region.length);
buf[32] = 0; /* ensure termination */
strcat(buf, "\r\n\r\n");
region.base = isc_mem_get(event->mctx, strlen(buf) + 1);
region.length = strlen(buf) + 1;
strcpy(region.base, buf); /* strcpy is safe */
strcpy((char *)region.base, buf); /* strcpy is safe */
isc_socket_send(sock, &region, task, my_send, event->arg);
} else {
region = dev->region;
@@ -187,7 +187,7 @@ my_connect(isc_task_t *task, isc_event_t *event)
strcpy(buf, "GET / HTTP/1.1\r\nHost: www.flame.org\r\nConnection: Close\r\n\r\n");
region.base = isc_mem_get(event->mctx, strlen(buf) + 1);
region.length = strlen(buf) + 1;
strcpy(region.base, buf); /* strcpy is safe */
strcpy((char *)region.base, buf); /* strcpy is safe */
isc_socket_send(sock, &region, task, my_http_get, event->arg);

View File

@@ -140,7 +140,7 @@ static unsigned char maptolower[] = {
static struct dns_name root = {
NAME_MAGIC,
"", 1, 1, NULL,
(unsigned char *)"", 1, 1, NULL,
{(void *)-1, (void *)-1}
};

View File

@@ -27,7 +27,7 @@
#define BUFFER_MAGIC 0x42756621U /* Buf!. */
void
isc_buffer_init(isc_buffer_t *b, unsigned char *base, unsigned int length,
isc_buffer_init(isc_buffer_t *b, void *base, unsigned int length,
unsigned int type) {
/*
* Make 'b' refer to the 'length'-byte region starting at base.
@@ -105,7 +105,7 @@ isc_buffer_available(isc_buffer_t *b, isc_region_t *r) {
REQUIRE(VALID_BUFFER(b));
REQUIRE(r != NULL);
r->base = b->base + b->used;
r->base = (unsigned char *)b->base + b->used;
r->length = b->length - b->used;
}

View File

@@ -110,7 +110,7 @@ typedef struct isc_buffer {
void
isc_buffer_init(isc_buffer_t *b, unsigned char *base, unsigned int length,
isc_buffer_init(isc_buffer_t *b, void *base, unsigned int length,
unsigned int type);
/*
* Make 'b' refer to the 'length'-byte region starting at base.