diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-05-10 12:36:23 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-05-10 12:36:23 +0000 |
commit | b2c5560247a516560564cee0a24ccfcaacbb3db4 (patch) | |
tree | dbf2ae0d89b2739fbec2ca53c92b3d12a36d1887 /sys/arch/sparc64 | |
parent | 3f671ca039affb7f6d117ff7721b713fce291793 (diff) |
Fix formwat string. Cast pointer to long and print it using %lx since %p
prefixes the address with 0x which we want to avoid here.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/prtc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/prtc.c b/sys/arch/sparc64/dev/prtc.c index b7ecb8f7641..a44b7a9a913 100644 --- a/sys/arch/sparc64/dev/prtc.c +++ b/sys/arch/sparc64/dev/prtc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: prtc.c,v 1.2 2008/07/10 08:58:00 kettenis Exp $ */ +/* $OpenBSD: prtc.c,v 1.3 2014/05/10 12:36:22 kettenis Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -93,7 +93,7 @@ prtc_gettime(todr_chip_handle_t handle, struct timeval *tv) return (0); } - snprintf(buf, sizeof(buf), "h# %08x unix-gettod", &tod); + snprintf(buf, sizeof(buf), "h# %08lx unix-gettod", (long)&tod); OF_interpret(buf, 0); tv->tv_sec = tod; |