[OPTIM] used unsigned ints for HTTP state and message offsets
State and offsets within http_msg were incorrectly set to signed int.
Turning them into unsigned slightly improved performance while reducing
code size.
diff --git a/include/types/proto_http.h b/include/types/proto_http.h
index 6453061..50d12d6 100644
--- a/include/types/proto_http.h
+++ b/include/types/proto_http.h
@@ -204,12 +204,12 @@
* which marks the end of the line (LF or CRLF).
*/
struct http_msg {
- int msg_state; /* where we are in the current message parsing */
+ unsigned int msg_state; /* where we are in the current message parsing */
char *sol; /* start of line, also start of message when fully parsed */
char *eol; /* end of line */
- int som; /* Start Of Message, relative to buffer */
- int col, sov; /* current header: colon, start of value */
- int eoh; /* End Of Headers, relative to buffer */
+ unsigned int som; /* Start Of Message, relative to buffer */
+ unsigned int col, sov; /* current header: colon, start of value */
+ unsigned int eoh; /* End Of Headers, relative to buffer */
char **cap; /* array of captured headers (may be NULL) */
union { /* useful start line pointers, relative to buffer */
struct {