summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/sys/racct.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/racct.h b/sys/sys/racct.h
index 7a7c07a..fa772f5 100644
--- a/sys/sys/racct.h
+++ b/sys/sys/racct.h
@@ -92,7 +92,8 @@ extern int racct_enable;
* visible to the userland. It gets fixed up when retrieving resource
* usage or adding rules.
*/
-#define RACCT_IS_IN_MILLIONS(X) (racct_types[X] & RACCT_IN_MILLIONS)
+#define RACCT_IS_IN_MILLIONS(X) \
+ ((X) != RACCT_UNDEFINED && (racct_types[(X)] & RACCT_IN_MILLIONS) != 0)
/*
* Resource usage can drop, as opposed to only grow. When the process
OpenPOWER on IntegriCloud