- netdev_read_start(udp_dgram_len-UDP_HEADER_SIZE);
- for (i = 0; i < udp_dgram_len-UDP_HEADER_SIZE; ++i)
- buf[i] = netdev_read_byte();
+ len = udp_dgram_len - UDP_HEADER_SIZE;
+ netdev_read_start(len);
+ for (i = 0; i < len; ++i)
+ buf[i] = udp_read_byte();