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/server_http.c | |
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/server_http.c')
-rw-r--r-- | httpd/server_http.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/httpd/server_http.c b/httpd/server_http.c index bb29358..a31e8ff 100644 --- a/httpd/server_http.c +++ b/httpd/server_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_http.c,v 1.96 2015/07/31 00:10:51 benno Exp $ */ +/* $OpenBSD: server_http.c,v 1.97 2015/08/20 13:00:23 reyk Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -152,7 +152,7 @@ server_http_authenticate(struct server_config *srv_conf, struct client *clt) if (strncmp(ba->kv_value, "Basic ", strlen("Basic ")) != 0) goto done; - if (b64_pton(strchr(ba->kv_value, ' ') + 1, (u_int8_t *)decoded, + if (b64_pton(strchr(ba->kv_value, ' ') + 1, (uint8_t *)decoded, sizeof(decoded)) <= 0) goto done; @@ -733,7 +733,7 @@ server_http_parsehost(char *host, char *buf, size_t len, int *portval) } void -server_abort_http(struct client *clt, u_int code, const char *msg) +server_abort_http(struct client *clt, unsigned int code, const char *msg) { struct server_config *srv_conf = clt->clt_srv_conf; struct bufferevent *bev = clt->clt_bev; @@ -1226,7 +1226,7 @@ server_getlocation(struct client *clt, const char *path) } int -server_response_http(struct client *clt, u_int code, +server_response_http(struct client *clt, unsigned int code, struct media_type *media, off_t size, time_t mtime) { struct server_config *srv_conf = clt->clt_srv_conf; @@ -1397,7 +1397,7 @@ server_httpmethod_byname(const char *name) } const char * -server_httpmethod_byid(u_int id) +server_httpmethod_byid(unsigned int id) { const char *name = "<UNKNOWN>"; int i; @@ -1426,7 +1426,7 @@ server_httpmethod_cmp(const void *a, const void *b) } const char * -server_httperror_byid(u_int id) +server_httperror_byid(unsigned int id) { struct http_error error, *res; @@ -1450,7 +1450,7 @@ server_httperror_cmp(const void *a, const void *b) } int -server_log_http(struct client *clt, u_int code, size_t len) +server_log_http(struct client *clt, unsigned int code, size_t len) { static char tstamp[64]; static char ip[INET6_ADDRSTRLEN]; |