Since LEGAL_TE_INSTANCE_RANGE() was being passed an unsigned int, a warning
was being thrown due to the compare against >= 0. Since this macro was used
only in one place, I removed the macro for an explict compare against a
constant for the MAX.
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
{
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. */
*
*/
-#define LEGAL_TE_INSTANCE_RANGE(i) (0 <= (i) && (i) <= 0xffff)
+#define MAX_LEGAL_TE_INSTANCE_NUM (0xffff)
/*
* 24 16 8 0