Print intptr_t values by first casting to intmax_t and then printing with

%jd, as intptr_t may not be int-sized.

Assistance from:	jhb
Spotted by:		Mr Tinderbox
This commit is contained in:
Robert Watson 2007-02-06 17:22:36 +00:00
parent 4dbb37bd82
commit 1ca8672907
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166538

View File

@ -119,7 +119,7 @@ mac_partition_externalize_label(struct label *label, char *element_name,
(*claimed)++;
if (sbuf_printf(sb, "%d", SLOT(label)) == -1)
if (sbuf_printf(sb, "%jd", (intmax_t)SLOT(label)) == -1)
return (EINVAL);
else
return (0);