[systemd-devel] [PATCH] sd-dhcp6-client: fix uninitialized variables

2014-06-19 Thread Ronny Chevalier
---
 src/libsystemd-network/sd-dhcp6-client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libsystemd-network/sd-dhcp6-client.c 
b/src/libsystemd-network/sd-dhcp6-client.c
index ef5fb44..97a2ba7 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/sd-dhcp6-client.c
@@ -310,7 +310,7 @@ static int client_timeout_resend(sd_event_source *s, 
uint64_t usec,
 sd_dhcp6_client *client = userdata;
 usec_t time_now, init_retransmit_time, max_retransmit_time;
 usec_t max_retransmit_duration;
-uint8_t max_retransmit_count;
+uint8_t max_retransmit_count = 0;
 char time_string[FORMAT_TIMESPAN_MAX];
 
 assert(s);
@@ -434,7 +434,7 @@ static int client_ensure_iaid(sd_dhcp6_client *client) {
 if (detect_container(NULL) = 0) {
 /* not in a container, udev will be around */
 _cleanup_udev_unref_ struct udev *udev;
-_cleanup_udev_device_unref_ struct udev_device *device;
+_cleanup_udev_device_unref_ struct udev_device *device = NULL;
 char ifindex_str[2 + DECIMAL_STR_MAX(int)];
 
 udev = udev_new();
-- 
2.0.0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] sd-dhcp6-client: fix uninitialized variables

2014-06-19 Thread Lennart Poettering
On Thu, 19.06.14 19:44, Ronny Chevalier (chevalier.ro...@gmail.com) wrote:

Looks good! Applied!

 ---
  src/libsystemd-network/sd-dhcp6-client.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/src/libsystemd-network/sd-dhcp6-client.c 
 b/src/libsystemd-network/sd-dhcp6-client.c
 index ef5fb44..97a2ba7 100644
 --- a/src/libsystemd-network/sd-dhcp6-client.c
 +++ b/src/libsystemd-network/sd-dhcp6-client.c
 @@ -310,7 +310,7 @@ static int client_timeout_resend(sd_event_source *s, 
 uint64_t usec,
  sd_dhcp6_client *client = userdata;
  usec_t time_now, init_retransmit_time, max_retransmit_time;
  usec_t max_retransmit_duration;
 -uint8_t max_retransmit_count;
 +uint8_t max_retransmit_count = 0;
  char time_string[FORMAT_TIMESPAN_MAX];
  
  assert(s);
 @@ -434,7 +434,7 @@ static int client_ensure_iaid(sd_dhcp6_client *client) {
  if (detect_container(NULL) = 0) {
  /* not in a container, udev will be around */
  _cleanup_udev_unref_ struct udev *udev;
 -_cleanup_udev_device_unref_ struct udev_device *device;
 +_cleanup_udev_device_unref_ struct udev_device *device = 
 NULL;
  char ifindex_str[2 + DECIMAL_STR_MAX(int)];
  
  udev = udev_new();


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel