Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

rename parser->errno to parser->http_errno; conflicts with errno.h wh…

…ere errno is defined as a macro
  • Loading branch information...
commit 2b2ba2da1adeab4c8ea4d4e8d6f5605ab3ca0b1a 1 parent 31ee648
Fouad Mardini authored

Showing 2 changed files with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +3 3 http_parser.c
  2. +2 2 http_parser.h
6 http_parser.c
@@ -34,13 +34,13 @@
34 34 #if HTTP_PARSER_DEBUG
35 35 #define SET_ERRNO(e) \
36 36 do { \
37   - parser->errno = (e); \
  37 + parser->http_errno = (e); \
38 38 parser->error_lineno = __LINE__; \
39 39 } while (0)
40 40 #else
41 41 #define SET_ERRNO(e) \
42 42 do { \
43   - parser->errno = (e); \
  43 + parser->http_errno = (e); \
44 44 } while(0)
45 45 #endif
46 46
@@ -1760,7 +1760,7 @@ http_parser_init (http_parser *parser, enum http_parser_type t)
1760 1760 parser->upgrade = 0;
1761 1761 parser->flags = 0;
1762 1762 parser->method = 0;
1763   - parser->errno = 0;
  1763 + parser->http_errno = 0;
1764 1764 }
1765 1765
1766 1766 const char *
4 http_parser.h
@@ -189,7 +189,7 @@ enum http_errno {
189 189
190 190
191 191 /* Get an http_errno value from an http_parser */
192   -#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->errno)
  192 +#define HTTP_PARSER_ERRNO(p) ((enum http_errno) (p)->http_errno)
193 193
194 194 /* Get the line number that generated the current error */
195 195 #if HTTP_PARSER_DEBUG
@@ -215,7 +215,7 @@ struct http_parser {
215 215 unsigned short http_minor;
216 216 unsigned short status_code; /* responses only */
217 217 unsigned char method; /* requests only */
218   - unsigned char errno : 7;
  218 + unsigned char http_errno : 7;
219 219
220 220 /* 1 = Upgrade header was present and the parser has exited because of that.
221 221 * 0 = No upgrade header present.

0 comments on commit 2b2ba2d

Please sign in to comment.
Something went wrong with that request. Please try again.