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

(cherry picked from commit 186d559d63)
This commit is contained in:
Thomas Haller 2019-08-02 08:55:30 +02:00
parent 4952e945dc
commit ee153744a9

View file

@ -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;