MINOR: actions: remove the mark indicating the last entry in enum
This mark permit to detect if the action tag is over the allowed range.
- Normally, this case doesn't appear
- If it appears, it is processed by ded fault case of the switch
diff --git a/include/types/proto_http.h b/include/types/proto_http.h
index 563d02d..62016da 100644
--- a/include/types/proto_http.h
+++ b/include/types/proto_http.h
@@ -252,7 +252,6 @@
HTTP_REQ_ACT_TRK_SC0,
/* SC1, SC2, ... SCn */
HTTP_REQ_ACT_TRK_SCMAX = HTTP_REQ_ACT_TRK_SC0 + MAX_SESS_STKCTR - 1,
- HTTP_REQ_ACT_MAX /* must always be last */
};
/* actions for "http-response" */
@@ -276,7 +275,6 @@
HTTP_RES_ACT_REDIR,
HTTP_RES_ACT_CUSTOM_STOP, /* used for module keywords */
HTTP_RES_ACT_CUSTOM_CONT, /* used for module keywords */
- HTTP_RES_ACT_MAX /* must always be last */
};
/* final results for http-request rules */
diff --git a/src/proto_http.c b/src/proto_http.c
index 6571fda..0d8f50c 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -3432,8 +3432,6 @@
s->current_rule_list = rules;
list_for_each_entry(rule, rules, list) {
- if (rule->action >= HTTP_REQ_ACT_MAX)
- continue;
/* check optional condition */
if (rule->cond) {
@@ -3694,6 +3692,10 @@
}
}
break;
+
+ /* other flags exists, but normaly, they never be matched. */
+ default:
+ break;
}
}
@@ -3735,8 +3737,6 @@
s->current_rule_list = rules;
list_for_each_entry(rule, rules, list) {
- if (rule->action >= HTTP_RES_ACT_MAX)
- continue;
/* check optional condition */
if (rule->cond) {
@@ -3918,6 +3918,10 @@
case HTTP_RES_ACT_CUSTOM_STOP:
rule->action_ptr(rule, px, s->sess, s);
return HTTP_RULE_RES_STOP;
+
+ /* other flags exists, but normaly, they never be matched. */
+ default:
+ break;
}
}