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/log.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'httpd/log.c') diff --git a/httpd/log.c b/httpd/log.c index a5dfc6b..16e57d0 100644 --- a/httpd/log.c +++ b/httpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.5 2015/01/21 22:21:05 reyk Exp $ */ +/* $OpenBSD: log.c,v 1.6 2015/08/20 13:00:23 reyk Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -183,7 +183,7 @@ const char * print_time(struct timeval *a, struct timeval *b, char *buf, size_t len) { struct timeval tv; - u_long h, sec, min; + unsigned long h, sec, min; timerclear(&tv); timersub(a, b, &tv); @@ -196,7 +196,7 @@ print_time(struct timeval *a, struct timeval *b, char *buf, size_t len) } const char * -printb_flags(const u_int32_t v, const char *bits) +printb_flags(const uint32_t v, const char *bits) { static char buf[2][BUFSIZ]; static int idx = 0; @@ -219,7 +219,8 @@ printb_flags(const u_int32_t v, const char *bits) if (c == '_') *p++ = ' '; else - *p++ = tolower((u_char)c); + *p++ = + tolower((unsigned char)c); } } else for (; *bits > 32; bits++) -- cgit v1.2.3-54-g00ecf