1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00

Do not break strict-aliasing rules.

dcc-send.c:296:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules
This commit is contained in:
David Hill 2014-06-20 12:43:24 -04:00
parent 9d0d4d9437
commit 444f9e4836

View File

@ -293,7 +293,8 @@ static void dcc_send_read_size(SEND_DCC_REC *dcc)
if (dcc->count_pos != 4)
return;
bytes = ntohl(*((guint32 *) dcc->count_buf));
memcpy(&bytes, dcc->count_buf, sizeof(bytes));
bytes = ntohl(bytes);
dcc->count_pos = 0;
if (dcc->waitforend && bytes == (dcc->transfd & 0xffffffff)) {