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/logger.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/logger.c')
-rw-r--r-- | httpd/logger.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/httpd/logger.c b/httpd/logger.c index d03d954..4d3b741 100644 --- a/httpd/logger.c +++ b/httpd/logger.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logger.c,v 1.12 2015/04/11 14:52:49 jsing Exp $ */ +/* $OpenBSD: logger.c,v 1.13 2015/08/20 13:00:23 reyk Exp $ */ /* * Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org> @@ -46,7 +46,7 @@ int logger_log(struct imsg *); static struct httpd *env = NULL; int proc_id; -static u_int32_t last_log_id = 0; +static uint32_t last_log_id = 0; static struct privsep_proc procs[] = { { "parent", PROC_PARENT, logger_dispatch_parent }, @@ -138,7 +138,7 @@ int logger_open_fd(struct imsg *imsg) { struct log_file *log; - u_int32_t id; + uint32_t id; IMSG_SIZE_CHECK(imsg, &id); memcpy(&id, imsg->data, sizeof(id)); @@ -160,7 +160,7 @@ logger_open_priv(struct imsg *imsg) { char path[PATH_MAX]; char name[NAME_MAX], *p; - u_int32_t id; + uint32_t id; size_t len; int fd; @@ -244,7 +244,7 @@ int logger_log(struct imsg *imsg) { char *logline; - u_int32_t id; + uint32_t id; struct server_config *srv_conf; struct log_file *log; |