summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospfd/ospf_te.c2
-rw-r--r--ospfd/ospf_te.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 24e81052..587564a1 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -205,7 +205,7 @@ get_mpls_te_instance_value (void)
{
static u_int32_t seqno = 0;
- if (LEGAL_TE_INSTANCE_RANGE (seqno + 1))
+ if (seqno < MAX_LEGAL_TE_INSTANCE_NUM )
seqno += 1;
else
seqno = 1; /* Avoid zero. */
diff --git a/ospfd/ospf_te.h b/ospfd/ospf_te.h
index e8511cdf..863d8ba8 100644
--- a/ospfd/ospf_te.h
+++ b/ospfd/ospf_te.h
@@ -41,7 +41,7 @@
*
*/
-#define LEGAL_TE_INSTANCE_RANGE(i) (0 <= (i) && (i) <= 0xffff)
+#define MAX_LEGAL_TE_INSTANCE_NUM (0xffff)
/*
* 24 16 8 0