From: Jo-Philipp Wich Date: Thu, 30 Jul 2009 11:07:29 +0000 (+0000) Subject: luci-0.9: merge r5171 X-Git-Tag: 0.9.0~144 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=83d4fb3adbed09cd9f4aeebc68382c2062f0669b;p=oweals%2Fluci.git luci-0.9: merge r5171 --- diff --git a/libs/lmo/src/lmo_core.c b/libs/lmo/src/lmo_core.c index f9e533130..cd117bec8 100644 --- a/libs/lmo/src/lmo_core.c +++ b/libs/lmo/src/lmo_core.c @@ -22,13 +22,10 @@ extern char _lmo_error[1024]; static int lmo_read32( int fd, uint32_t *val ) { - uint8_t buffer[5]; - - if( read(fd, buffer, 4) < 4 ) + if( read(fd, val, 4) < 4 ) return -1; - buffer[4] = 0; - *val = ntohl(*((uint32_t *) buffer)); + *val = ntohl(*val); return 4; }