aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-11-05 01:25:03 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-11-05 01:25:03 +0100
commitd38ca03946000f0837e9a0e04937499509db54c4 (patch)
tree8d0d0bed4b2b2e770b4069fa30918272d60e2906 /networking/udhcp/dhcpc.c
parent2017d48c0d70bef8768efb42909e605ea8eb5a21 (diff)
downloadbusybox-w32-d38ca03946000f0837e9a0e04937499509db54c4.tar.gz
busybox-w32-d38ca03946000f0837e9a0e04937499509db54c4.tar.bz2
busybox-w32-d38ca03946000f0837e9a0e04937499509db54c4.zip
udhcpc: reuse string constant; remove unneeded memset(0)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index d0fe94a48..ea798a3f4 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -800,7 +800,6 @@ static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
800 struct ip_udp_dhcp_packet packet; 800 struct ip_udp_dhcp_packet packet;
801 uint16_t check; 801 uint16_t check;
802 802
803 memset(&packet, 0, sizeof(packet));
804 bytes = safe_read(fd, &packet, sizeof(packet)); 803 bytes = safe_read(fd, &packet, sizeof(packet));
805 if (bytes < 0) { 804 if (bytes < 0) {
806 log1("Packet read error, ignoring"); 805 log1("Packet read error, ignoring");
@@ -858,7 +857,7 @@ static NOINLINE int udhcp_recv_raw_packet(struct dhcp_packet *dhcp_pkt, int fd)
858 return -2; 857 return -2;
859 } 858 }
860 859
861 log1("Got valid DHCP packet"); 860 log1("Received a packet");
862 udhcp_dump_packet(&packet.data); 861 udhcp_dump_packet(&packet.data);
863 862
864 bytes -= sizeof(packet.ip) + sizeof(packet.udp); 863 bytes -= sizeof(packet.ip) + sizeof(packet.udp);