diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-02-06 17:22:36 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-02-06 17:22:36 +0000 |
commit | 477d310a8e743bae47362dca26446244080eea4f (patch) | |
tree | 640b4c73dd33cb2f08370a6a5345d4baf70b3139 | |
parent | 8a05e41ae5685d8d92d7d2a1cbd8dd3584a72bc7 (diff) | |
download | FreeBSD-src-477d310a8e743bae47362dca26446244080eea4f.zip FreeBSD-src-477d310a8e743bae47362dca26446244080eea4f.tar.gz |
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
-rw-r--r-- | sys/security/mac_partition/mac_partition.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/mac_partition/mac_partition.c b/sys/security/mac_partition/mac_partition.c index 76420a5..6fef299 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); |