summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2010-01-11 23:33:30 +0000
committermckusick <mckusick@FreeBSD.org>2010-01-11 23:33:30 +0000
commit360184f5a52ece4a18e2a8c0426367109a559978 (patch)
treea954a1e89ab0f95665bf7bf29986e4aec1ff3102 /sbin/fsck_ffs
parentea9dd2277f03c1fb159dbd0de2d26e3ae32a87e4 (diff)
downloadFreeBSD-src-360184f5a52ece4a18e2a8c0426367109a559978.zip
FreeBSD-src-360184f5a52ece4a18e2a8c0426367109a559978.tar.gz
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
Diffstat (limited to 'sbin/fsck_ffs')
-rw-r--r--sbin/fsck_ffs/pass2.c4
1 files changed, 2 insertions, 2 deletions
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) {
OpenPOWER on IntegriCloud