From 0555df65d3b18a916e5694c684829c824e8271dd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 19 Nov 2014 17:09:57 +0100 Subject: [PATCH] core: minor fix to ensure safe boolean comparison in have_ip6_address() Signed-off-by: Thomas Haller --- src/devices/nm-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index c86ece86ee..864a7d57bd 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -3642,6 +3642,8 @@ have_ip6_address (const NMIP6Config *ip6_config, gboolean linklocal) if (!ip6_config) return FALSE; + linklocal = !!linklocal; + for (i = 0; i < nm_ip6_config_get_num_addresses (ip6_config); i++) { const NMPlatformIP6Address *addr = nm_ip6_config_get_address (ip6_config, i);