svn commit: r291637 - head/cddl/contrib/opensolaris/cmd/plockstat

Craig Rodrigues rodrigc at FreeBSD.org
Wed Dec 2 04:18:31 UTC 2015


On Tue, Dec 1, 2015 at 6:11 PM, Bryan Drewery <bdrewery at freebsd.org> wrote:

> -               (void) snprintf(buf, size, "%#lx", addr);
> +               (void) snprintf(buf, size, "%#lx", (unsigned long)addr);
>                 return (0);
>

In the past when I've hit these types of problems,
I have found that using %#jx and casting to (uintmax_t) instead seemed to
work
consistently across different platforms, so you might want to do that here.
There are lots of examples in the tree of this pattern.

--
Craig


More information about the svn-src-head mailing list