From 1ca8672907e9361fc900f835492b85e46a057a65 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Tue, 6 Feb 2007 17:22:36 +0000 Subject: [PATCH] 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 --- sys/security/mac_partition/mac_partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/mac_partition/mac_partition.c b/sys/security/mac_partition/mac_partition.c index 76420a59393d..6fef2990c967 100644 --- a/sys/security/mac_partition/mac_partition.c +++ b/sys/security/mac_partition/mac_partition.c @@ -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);