From afa5fc7e77eed9060feef54739410477fb099ea9 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 10 May 2014 12:36:22 +0000 Subject: [PATCH] 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. --- sys/arch/sparc64/dev/prtc.c | 4 ++-- 1 file 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; -- 2.20.1