libnm: fix comparison of pfm enum against zero

Fixes compiler warning

  comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare]

Fixes: 6ef59b5b77
This commit is contained in:
Thomas Haller 2017-04-28 19:26:59 +02:00
parent 59805d8c59
commit d67d12ebe1

View file

@ -1031,8 +1031,8 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
}
}
if ( priv->pmf < 0
|| priv->pmf > NM_SETTING_WIRELESS_SECURITY_PMF_REQUIRED) {
G_STATIC_ASSERT_EXPR (((NMSettingWirelessSecurityPmf) -1) > 0);
if (priv->pmf > NM_SETTING_WIRELESS_SECURITY_PMF_REQUIRED) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY,