From be1f04038dd3cd0a02eaf3e8ccbabe682d7bbfb0 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 9 Jan 2017 20:22:06 +0100 Subject: [PATCH] device: fix invalid assertion Fixes: f0d40525dfb079820e5dce48360ef6a9a540064a --- src/devices/nm-device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 256651cf66..bd53b0967a 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -714,9 +714,10 @@ _get_stable_id (NMDevice *self, &generated); /* current_stable_id_type is a bitfield! */ - nm_assert (stable_type <= (NMUtilsStableType) 0x2); - nm_assert (stable_type + (NMUtilsStableType) 1 > (NMUtilsStableType) 0); priv->current_stable_id_type = stable_type; + nm_assert (stable_type <= (NMUtilsStableType) 0x3); + nm_assert (stable_type + (NMUtilsStableType) 1 > (NMUtilsStableType) 0); + nm_assert (priv->current_stable_id_type == stable_type); if (stable_type == NM_UTILS_STABLE_TYPE_UUID) priv->current_stable_id = g_strdup (uuid);