summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2017-08-07 11:50:58 +0000
committerkettenis <kettenis@openbsd.org>2017-08-07 11:50:58 +0000
commit790489dc00da3a608a2b5d62397c7dc3ef2d8730 (patch)
tree0a05dc7e37bc9dbdeb9671c279c799e34f6f2b83 /sys/kern/subr_disk.c
parentIn pf.conf the icmp6-type notnbr-unr has been renamed to beyond-unr. (diff)
downloadwireguard-openbsd-790489dc00da3a608a2b5d62397c7dc3ef2d8730.tar.xz
wireguard-openbsd-790489dc00da3a608a2b5d62397c7dc3ef2d8730.zip
Turns out gcc complains about %02hhx. So simply use %02x instead. This is
accepted by both clang and gcc and safe given that varargs arguments are promoted to int anyway. Using %h in the kernel is discouraged anyway according to bluhm@. Unbreaks the tree on gcc architectures. ok pirofti@, bluhm@, florian@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 931b72b5f2a..093c3458c73 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.231 2017/08/06 19:56:29 kettenis Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.232 2017/08/07 11:50:58 kettenis Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -1864,7 +1864,7 @@ duid_format(u_char *duid)
static char duid_str[17];
snprintf(duid_str, sizeof(duid_str),
- "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx",
+ "%02x%02x%02x%02x%02x%02x%02x%02x",
duid[0], duid[1], duid[2], duid[3],
duid[4], duid[5], duid[6], duid[7]);