From 360184f5a52ece4a18e2a8c0426367109a559978 Mon Sep 17 00:00:00 2001 From: mckusick Date: Mon, 11 Jan 2010 23:33:30 +0000 Subject: Cast 64-bit quantity to intptr_t rather than int so as to work properly with 64-bit architectures (such as amd64). Reported by: Xin LI and Josh Paetzel --- sbin/fsck_ffs/pass2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/fsck_ffs') diff --git a/sbin/fsck_ffs/pass2.c b/sbin/fsck_ffs/pass2.c index 35ab363..a4f73b3 100644 --- a/sbin/fsck_ffs/pass2.c +++ b/sbin/fsck_ffs/pass2.c @@ -547,7 +547,7 @@ fix_extraneous(struct inoinfo *inp, struct inodesc *idesc) printf(" (IGNORED)\n"); return (0); } - cmd.value = (int)idesc->id_dirp->d_name; + cmd.value = (intptr_t)idesc->id_dirp->d_name; cmd.size = inp->i_number; /* verify same name */ if (sysctlbyname("vfs.ffs.unlink", 0, 0, &cmd, sizeof cmd) == -1) { @@ -588,7 +588,7 @@ fix_extraneous(struct inoinfo *inp, struct inodesc *idesc) printf(" (IGNORED)\n"); return (0); } - cmd.value = (int)(cp + 1); + cmd.value = (intptr_t)(cp + 1); cmd.size = inp->i_number; /* verify same name */ if (sysctlbyname("vfs.ffs.unlink", 0, 0, &cmd, sizeof cmd) == -1) { -- cgit v1.1