summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2010-01-11 22:42:06 +0000
committermckusick <mckusick@FreeBSD.org>2010-01-11 22:42:06 +0000
commit94b44c09699a9884710ccc8d267d13aba19b5f53 (patch)
tree1c28eb3aedc09139a4e84bd1b866f9cd174a789e /sys/ufs
parentbdc1b5009d72b7137f0a3c97d246fa4ce5ef0213 (diff)
downloadFreeBSD-src-94b44c09699a9884710ccc8d267d13aba19b5f53.zip
FreeBSD-src-94b44c09699a9884710ccc8d267d13aba19b5f53.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: bz
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 02e6df8..1363474 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -2689,7 +2689,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
if (fsckcmds) {
char buf[32];
- if (copyinstr((char *)(int)cmd.value, buf, 32, NULL))
+ if (copyinstr((char *)(intptr_t)cmd.value, buf,32,NULL))
strncpy(buf, "Name_too_long", 32);
printf("%s: unlink %s (inode %jd)\n",
mp->mnt_stat.f_mntonname, buf, (intmax_t)cmd.size);
@@ -2702,7 +2702,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
*/
vn_finished_write(mp);
mp = NULL;
- error = kern_unlinkat(td, AT_FDCWD, (char *)(int)cmd.value,
+ error = kern_unlinkat(td, AT_FDCWD, (char *)(intptr_t)cmd.value,
UIO_USERSPACE, (ino_t)cmd.size);
break;
OpenPOWER on IntegriCloud