Code cleanup

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-03-25 14:48:50 +00:00
parent c2eb3e4095
commit 09acdee3e1

6
mud.c
View File

@@ -1088,9 +1088,11 @@ mud_packet_send(struct mud *mud, enum mud_packet_code code,
switch (code) { switch (code) {
case mud_conf: case mud_conf:
size = sizeof(packet->data.conf); size = sizeof(packet->data.conf);
memcpy(&packet->data.conf.public.local, &mud->crypto.public.local, memcpy(&packet->data.conf.public.local,
&mud->crypto.public.local,
sizeof(mud->crypto.public.local)); sizeof(mud->crypto.public.local));
memcpy(&packet->data.conf.public.remote, &mud->crypto.public.remote, memcpy(&packet->data.conf.public.remote,
&mud->crypto.public.remote,
sizeof(mud->crypto.public.remote)); sizeof(mud->crypto.public.remote));
packet->data.conf.aes = (unsigned char)mud->crypto.aes; packet->data.conf.aes = (unsigned char)mud->crypto.aes;
break; break;