Ignore:
Timestamp:
Apr 15, 2011, 7:34:53 AM (11 years ago)
Author:
Sam Hocevar
Message:

Fix a few compiler warnings caused by bad type punning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/net/fileman.cpp

    r125 r476  
    141141
    142142    actual=read(file_fd,buf+2,read_total);
    143     *((ushort *)buf)=lstl(actual);
     143    ushort tmp = lstl(actual);
     144    memcpy(buf, &tmp, sizeof(tmp));
    144145
    145146    int write_amount=sock->write(buf,actual+2);
Note: See TracChangeset for help on using the changeset viewer.