mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-30 13:24:48 +00:00
b52d3e2ad3
There is: 1) glib's MAX() macro, which evaluates arguments multiple times, but yields a constant expression, if the arguments are constant. 2) NM's NM_MAX() macro, which evaluates arguments exactly once, but never yields a constant expression. 3) systemd's MAX() which is like NM_MAX(). Now, it's sensible to use char buf[MAX (A_CONSTANT, ANOTHER_CONSTANT)]; and this works with glib's variant (1). However, when we include systemd headers, 1) gets redefined to 3), and above no longer works. That is because we we don't allow VLA and systemd's macro gives not a constant expression. Add NM_CONST_MAX() macro which is like systemd's CONST_MAX(). It can only operate on constant arguments. |
||
---|---|---|
.. | ||
c-list | ||
c-rbtree | ||
c-siphash | ||
n-acd | ||
nm-utils | ||
systemd | ||
meson.build | ||
nm-common-macros.h | ||
nm-dbus-compat.h | ||
nm-default.h | ||
nm-dispatcher-api.h | ||
nm-ethtool-utils.c | ||
nm-ethtool-utils.h | ||
nm-meta-setting.c | ||
nm-meta-setting.h | ||
nm-test-libnm-utils.h | ||
nm-test-utils-impl.c | ||
nm-version-macros.h.in |