From 674c1ef69f302980c6def35911c1ee3c4b68cef2 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Thu, 20 Aug 2015 16:14:26 +0200 Subject: 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@ --- httpd/logger.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'httpd/logger.c') 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 @@ -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; -- cgit v1.2.3-54-g00ecf