summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-11-11 15:39:52 +0100
committerDonald Sharp <sharpd@nvidia.com>2021-11-11 15:39:52 +0100
commit7a8ce9d56dec3844031563c3c55bed8eb3b692d5 (patch)
tree540ad9555825587c56143bcfc1d1172e4977a00c /lib
parentMerge pull request #10006 from chiragshah6/evpn_dev (diff)
downloadfrr-7a8ce9d56dec3844031563c3c55bed8eb3b692d5.tar.xz
frr-7a8ce9d56dec3844031563c3c55bed8eb3b692d5.zip
*: use compiler.h MIN/MAX macros instead of everyone having one
We had various forms of min/max macros across multiple daemons all of which duplicated what we have in compiler.h. Convert everyone to use the `correct` ones Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/snmp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/snmp.c b/lib/snmp.c
index 23d3f38b3..8d8b3c950 100644
--- a/lib/snmp.c
+++ b/lib/snmp.c
@@ -25,13 +25,11 @@
#include "smux.h"
-#define min(A,B) ((A) < (B) ? (A) : (B))
-
int oid_compare(const oid *o1, int o1_len, const oid *o2, int o2_len)
{
int i;
- for (i = 0; i < min(o1_len, o2_len); i++) {
+ for (i = 0; i < MIN(o1_len, o2_len); i++) {
if (o1[i] < o2[i])
return -1;
else if (o1[i] > o2[i])