summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-02 08:55:30 +0200
committerThomas Haller <thaller@redhat.com>2019-08-02 08:55:31 +0200
commit186d559d6320f159988a7155f9049c714510c6be (patch)
tree4e04c76b6e39599da46d112a6a9752e8378cd630
parentf61e274df973b515b17d958ac877fa78a3a2c2b0 (diff)
downloadNetworkManager-186d559d6320f159988a7155f9049c714510c6be.tar.gz
libnm: avoid NM_CONST_MAX() in enum definition for NMTeamAttribute
This confuses coverity. Just use MAX(). MAX() is usually not preferred as it evaluates the arguments more than once. But in this case, it is of course fine. CID 202433 (#1 of 1): Unrecoverable parse warning (PARSE_ERROR)1. expr_not_constant: expression must have a constant value
-rw-r--r--libnm-core/nm-team-utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-team-utils.h b/libnm-core/nm-team-utils.h
index 7da42a3f43..c4631bec9a 100644
--- a/libnm-core/nm-team-utils.h
+++ b/libnm-core/nm-team-utils.h
@@ -61,7 +61,7 @@ typedef enum {
NM_TEAM_ATTRIBUTE_PORT_LACP_KEY,
_NM_TEAM_ATTRIBUTE_PORT_NUM,
- _NM_TEAM_ATTRIBUTE_NUM = NM_CONST_MAX (_NM_TEAM_ATTRIBUTE_MASTER_NUM, _NM_TEAM_ATTRIBUTE_PORT_NUM),
+ _NM_TEAM_ATTRIBUTE_NUM = MAX (_NM_TEAM_ATTRIBUTE_MASTER_NUM, _NM_TEAM_ATTRIBUTE_PORT_NUM),
} NMTeamAttribute;