Date: Mon, 11 Jan 2010 23:33:30 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r202131 - head/sbin/fsck_ffs Message-ID: <201001112333.o0BNXUGn009761@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Mon Jan 11 23:33:30 2010 New Revision: 202131 URL: http://svn.freebsd.org/changeset/base/202131 Log: 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 Modified: head/sbin/fsck_ffs/pass2.c Modified: head/sbin/fsck_ffs/pass2.c ============================================================================== --- head/sbin/fsck_ffs/pass2.c Mon Jan 11 23:32:36 2010 (r202130) +++ head/sbin/fsck_ffs/pass2.c Mon Jan 11 23:33:30 2010 (r202131) @@ -547,7 +547,7 @@ fix_extraneous(struct inoinfo *inp, stru 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, stru 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001112333.o0BNXUGn009761>