[master] d13a51f1b avoid >= 0 comparison for enum which may be unsigned
Nils Goroll
nils.goroll at uplex.de
Sat May 30 11:00:08 UTC 2020
commit d13a51f1bb1c16f12fbfdfaaf0a333609528257f
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sat May 30 12:58:55 2020 +0200
avoid >= 0 comparison for enum which may be unsigned
depending on the compiler's mood
diff --git a/bin/varnishd/mgt/mgt.h b/bin/varnishd/mgt/mgt.h
index 4973abb4d..294b10a7f 100644
--- a/bin/varnishd/mgt/mgt.h
+++ b/bin/varnishd/mgt/mgt.h
@@ -110,10 +110,7 @@ enum jail_master_e {
JAIL_MASTER_KILL,
};
-#define ASSERT_JAIL_MASTER(x) do { \
- assert(x >= JAIL_MASTER_LOW); \
- assert(x <= JAIL_MASTER_KILL); \
- } while (0)
+#define ASSERT_JAIL_MASTER(x) assert(x <= JAIL_MASTER_KILL)
enum jail_subproc_e {
JAIL_SUBPROC_VCC = JAIL_MASTER_KILL + 1,
More information about the varnish-commit
mailing list