udhcpc: reuse string constant; remove unneeded memset(0)
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 5 Nov 2011 00:25:03 +0000 (01:25 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 5 Nov 2011 00:25:03 +0000 (01:25 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/dhcpc.c

index d0fe94a481e5a098a6e8da2da81adb1e94474317..ea798a3f450d8e944e0d9a6d74b496c71ef177ba 100644 (file)
@@ -800,7 +800,6 @@ static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
        struct ip_udp_dhcp_packet packet;
        uint16_t check;
 
-       memset(&packet, 0, sizeof(packet));
        bytes = safe_read(fd, &packet, sizeof(packet));
        if (bytes < 0) {
                log1("Packet read error, ignoring");
@@ -858,7 +857,7 @@ static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
                return -2;
        }
 
-       log1("Got valid DHCP packet");
+       log1("Received a packet");
        udhcp_dump_packet(&packet.data);
 
        bytes -= sizeof(packet.ip) + sizeof(packet.udp);