diff options
author | Reyk Floeter <reyk@esdenera.com> | 2015-08-20 16:14:26 +0200 |
---|---|---|
committer | Reyk Floeter <reyk@esdenera.com> | 2015-08-20 16:14:26 +0200 |
commit | 674c1ef69f302980c6def35911c1ee3c4b68cef2 (patch) | |
tree | 8fd68ee5bd14b11b6fcf6aea8e89e290234e6e13 /httpd/parse.y | |
parent | 5a94b0dcb28aad5e44b896a36d959f0e1654f409 (diff) | |
download | httpd-674c1ef69f302980c6def35911c1ee3c4b68cef2.tar.gz httpd-674c1ef69f302980c6def35911c1ee3c4b68cef2.zip |
sync CVS commitid: WDQybNKi4LiEFw8K:
Change httpd(8) to use C99-style fixed-width integers (uintN_t instead
of u_intN_t) and replace u_int with unsigned int. Mixing both
variants is a bad style and most contributors seem to prefer this
style; it also helps us to get used to it, portability, and
standardization.
Theoretically no binary change, except one in practice: httpd.o has a
different checksum because gcc with -O2 pads/optimizes "struct
privsep" differently when using "unsigned int" instead "u_int" for the
affected members. "u_int" is just a typedef of "unsigned int", -O0
doesn't build the difference and clang with -O2 doesn't do it either -
it is just another curiosity from gcc-land.
OK semarie@
Diffstat (limited to 'httpd/parse.y')
-rw-r--r-- | httpd/parse.y | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/httpd/parse.y b/httpd/parse.y index cbb1374..0b79585 100644 --- a/httpd/parse.y +++ b/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.73 2015/07/19 05:17:27 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.75 2015/08/20 13:00:23 reyk Exp $ */ /* * Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -1007,7 +1007,7 @@ mediaoptsl : mediastring medianames_l optsemicolon | include ; -mediastring : STRING '/' STRING { +mediastring : STRING '/' STRING { if (strlcpy(media.media_type, $1, sizeof(media.media_type)) >= sizeof(media.media_type) || @@ -1212,10 +1212,10 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; -int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; -int pushback_index = 0; +unsigned char *parsebuf; +int parseindex; +unsigned char pushback_buffer[MAXPUSHBACK]; +int pushback_index = 0; int lgetc(int quotec) @@ -1307,10 +1307,10 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; - int quotec, next, c; - int token; + unsigned char buf[8096]; + unsigned char *p, *val; + int quotec, next, c; + int token; top: p = buf; @@ -2091,7 +2091,7 @@ getservice(char *n) return (s->s_port); } - return (htons((u_short)llval)); + return (htons((unsigned short)llval)); } int |