aboutsummaryrefslogtreecommitdiff
path: root/httpd/log.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@esdenera.com>2015-08-20 16:14:26 +0200
committerReyk Floeter <reyk@esdenera.com>2015-08-20 16:14:26 +0200
commit674c1ef69f302980c6def35911c1ee3c4b68cef2 (patch)
tree8fd68ee5bd14b11b6fcf6aea8e89e290234e6e13 /httpd/log.c
parent5a94b0dcb28aad5e44b896a36d959f0e1654f409 (diff)
downloadhttpd-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/log.c')
-rw-r--r--httpd/log.c9
1 files changed, 5 insertions, 4 deletions
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 <henning@openbsd.org>
@@ -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++)