Parcourir la source

[master] Initialized the hops value of the DHCPv4 packet.

This prevents errors reported by valgrind about uninitialized value of
hops being used in unit tests which skip parsing the packet. Okayed
on jabber.
Marcin Siodelski il y a 11 ans
Parent
commit
0715531bad
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      src/lib/dhcp/pkt4.cc

+ 2 - 1
src/lib/dhcp/pkt4.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2013  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2014 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -67,6 +67,7 @@ Pkt4::Pkt4(const uint8_t* data, size_t len)
       remote_port_(DHCP4_CLIENT_PORT),
       op_(BOOTREQUEST),
       hwaddr_(new HWAddr()),
+      hops_(0),
       transid_(0),
       secs_(0),
       flags_(0),