The definition of MC_NCLASSES contained a violation of MISRA C:2012
Rule 10.1, therefore by moving it as an enumeration constant resolves the
violation and makes it more resilient to possible additions to that enum.
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
#define MC_NENT (MC_URGENT_NENT + MC_NONURGENT_NENT)
-#define MC_NCLASSES (MC_NONURGENT + 1)
-
#define COOKIE2MCTE(c) ((struct mctelem_ent *)(c))
#define MCTE2COOKIE(tep) ((mctelem_cookie_t)(tep))
typedef struct mctelem_cookie *mctelem_cookie_t;
typedef enum mctelem_class {
- MC_URGENT,
- MC_NONURGENT
+ MC_URGENT,
+ MC_NONURGENT,
+ MC_NCLASSES
} mctelem_class_t;
extern void mctelem_init(unsigned int);