mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-11 08:20:30 +01:00
all: use NM_MIN_CONST()/NM_MAX_CONST() instead of MIN()/MAX()
glib's MIN()/MAX() will be replaced by NM_MIN()/NM_MAX(). There are however a few places where NM_MIN()/NM_MAX() cannot be used. Adjust those places to use NM_MIN_CONST()/NM_MAX_CONST() instead.
This commit is contained in:
parent
fa500e5540
commit
5acd30ca44
4 changed files with 5 additions and 4 deletions
|
|
@ -48,7 +48,8 @@ typedef enum {
|
|||
NM_TEAM_ATTRIBUTE_PORT_LACP_KEY,
|
||||
_NM_TEAM_ATTRIBUTE_PORT_NUM,
|
||||
|
||||
_NM_TEAM_ATTRIBUTE_NUM = MAX(_NM_TEAM_ATTRIBUTE_MASTER_NUM, _NM_TEAM_ATTRIBUTE_PORT_NUM),
|
||||
_NM_TEAM_ATTRIBUTE_NUM =
|
||||
NM_MAX_CONST(_NM_TEAM_ATTRIBUTE_MASTER_NUM, _NM_TEAM_ATTRIBUTE_PORT_NUM),
|
||||
|
||||
} NMTeamAttribute;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ typedef enum _NMDedupMultiIdxMode {
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NMDedupMultiObj_Align (MAX(_nm_alignof(void *), _nm_alignof(gint64)))
|
||||
#define _NMDedupMultiObj_Align (NM_MAX_CONST(_nm_alignof(void *), _nm_alignof(gint64)))
|
||||
|
||||
struct _NMDedupMultiObj {
|
||||
union {
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ typedef enum _nm_packed {
|
|||
G_STATIC_ASSERT(RTA_MAX == (__RTA_MAX - 1));
|
||||
#define RTA_PREF 20
|
||||
#undef RTA_MAX
|
||||
#define RTA_MAX (MAX((__RTA_MAX - 1), RTA_PREF))
|
||||
#define RTA_MAX (NM_MAX_CONST((__RTA_MAX - 1), RTA_PREF))
|
||||
|
||||
#ifndef MACVLAN_FLAG_NOPROMISC
|
||||
#define MACVLAN_FLAG_NOPROMISC 1
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
* also "packed" is specified. That's what we want.
|
||||
* https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#Common-Type-Attributes.
|
||||
*/
|
||||
#define _NMPlatformObject_Align (MAX(_nm_alignof(void *), _nm_alignof(gint64)))
|
||||
#define _NMPlatformObject_Align (NM_MAX_CONST(_nm_alignof(void *), _nm_alignof(gint64)))
|
||||
|
||||
struct _NMPlatformObject {
|
||||
/* the object type has no fields of its own, it is only used to having
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue