nm-dhcp-client: use nm_assert() to check ifname

so that it gets compiled out in production builds, this check is
carried out anyway when the connection is created.

(cherry picked from commit 9e27252c27)
This commit is contained in:
Antonio Cardace 2020-02-12 17:04:46 +01:00
parent 91b2be2e1b
commit e52fccb0d0

View file

@ -1010,8 +1010,8 @@ set_property (GObject *object, guint prop_id,
case PROP_IFACE:
/* construct-only */
priv->iface = g_value_dup_string (value);
g_return_if_fail ( priv->iface
&& nm_utils_is_valid_iface_name (priv->iface, NULL));
g_return_if_fail (priv->iface);
nm_assert (nm_utils_is_valid_iface_name (priv->iface, NULL));
break;
case PROP_IFINDEX:
/* construct-only */