diff options
author | Thomas Haller <thaller@redhat.com> | 2019-05-30 08:29:53 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-06-11 08:25:10 +0200 |
commit | 7440c0c5648bca01597d2d6a245b6a213416958c (patch) | |
tree | 1749b812c7738ed0454ed5f422a34c1068f1409c /shared | |
parent | 109b3a5bb1a1b8e20bd44061c353714477b408a4 (diff) | |
download | NetworkManager-7440c0c5648bca01597d2d6a245b6a213416958c.tar.gz |
shared: use NM_MIN() in NM_CMP_FIELD_MEMCMP_LEN() macro
To avoid evaluating the argument more than once.
Diffstat (limited to 'shared')
-rw-r--r-- | shared/nm-glib-aux/nm-shared-utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h index 32088c57fa..6471fea36f 100644 --- a/shared/nm-glib-aux/nm-shared-utils.h +++ b/shared/nm-glib-aux/nm-shared-utils.h @@ -245,7 +245,7 @@ nm_ip4_addr_is_localhost (in_addr_t addr4) #define NM_CMP_FIELD_MEMCMP_LEN(a, b, field, len) \ NM_CMP_RETURN (memcmp (&((a)->field), &((b)->field), \ - MIN (len, sizeof ((a)->field)))) + NM_MIN (len, sizeof ((a)->field)))) #define NM_CMP_FIELD_MEMCMP(a, b, field) \ NM_CMP_RETURN (memcmp (&((a)->field), \ |