respondd: use normal assignment instead of memcpy

This commit is contained in:
lemoer 2016-09-10 03:22:14 +02:00
parent 575186c43c
commit eeef7d216a
1 changed files with 1 additions and 2 deletions

View File

@ -398,7 +398,6 @@ static void accept_request(struct request_schedule *schedule, int sock,
char input[REQUEST_MAXLEN];
ssize_t input_bytes;
struct sockaddr_in6 addr;
socklen_t addrlen = sizeof(addr);
char control[256];
struct in6_addr destaddr;
struct cmsghdr *cmsg;
@ -467,7 +466,7 @@ static void accept_request(struct request_schedule *schedule, int sock,
new_task->scheduled_time = now + delay;
strncpy(new_task->request, input, input_bytes + 1);
new_task->request[input_bytes] = 0;
memcpy(&new_task->client_addr, &addr, addrlen);
new_task->client_addr = addr;
if (!schedule_push_request(schedule, new_task)) {
free(new_task);