From 7ba312397c2a6c851a4b5efe6c1603b1e1bda6ff Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Sun, 15 Feb 2015 17:44:48 +0100 Subject: [PATCH] header: fix field sizes The flags enum does not fit into 6 bits anymore. Fix: #218 PR-URL: https://github.com/joyent/http-parser/pull/219 Reviewed-By: Ben Noordhuis --- http_parser.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http_parser.h b/http_parser.h index 21f38e4..99c533a 100644 --- a/http_parser.h +++ b/http_parser.h @@ -204,8 +204,8 @@ enum http_errno { struct http_parser { /** PRIVATE **/ unsigned int type : 2; /* enum http_parser_type */ - unsigned int flags : 6; /* F_* values from 'flags' enum; semi-public */ - unsigned int state : 8; /* enum state from http_parser.c */ + unsigned int flags : 7; /* F_* values from 'flags' enum; semi-public */ + unsigned int state : 7; /* enum state from http_parser.c */ unsigned int header_state : 8; /* enum header_state from http_parser.c */ unsigned int index : 8; /* index into current matcher */