diff options
author | Thomas Haller <thaller@redhat.com> | 2017-04-28 19:26:59 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-04-28 19:28:03 +0200 |
commit | d67d12ebe1996a74f33610eaf2d9f46258901c61 (patch) | |
tree | 7fe75d48cea39acc87c2f84070be1da3ade25c38 | |
parent | 59805d8c59a86b5868ce8e62d90b6c817adebd25 (diff) | |
download | NetworkManager-d67d12ebe1996a74f33610eaf2d9f46258901c61.tar.gz |
libnm: fix comparison of pfm enum against zero
Fixes compiler warning
comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare]
Fixes: 6ef59b5b776690097d28538db17e0ff8a3df84d5
-rw-r--r-- | libnm-core/nm-setting-wireless-security.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm-core/nm-setting-wireless-security.c b/libnm-core/nm-setting-wireless-security.c index 1d07397878..8ddefba2f2 100644 --- a/libnm-core/nm-setting-wireless-security.c +++ b/libnm-core/nm-setting-wireless-security.c @@ -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, |