summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authorgleb <gleb@FreeBSD.org>2012-05-18 10:15:46 +0000
committergleb <gleb@FreeBSD.org>2012-05-18 10:15:46 +0000
commit6419400ed44575175ae5e3af7f6711f9b075ef55 (patch)
tree1ddd195e1d91efe3faf7942a1bcf5d0b39229b08 /usr.bin/fstat
parent1f12bc49add80da7d6b25b8c5132d62e32cb9b39 (diff)
downloadFreeBSD-src-6419400ed44575175ae5e3af7f6711f9b075ef55.zip
FreeBSD-src-6419400ed44575175ae5e3af7f6711f9b075ef55.tar.gz
Don't cast inode number or file size down to long or unsigned.
Since ino_t size is about to change to 64-bits, casts to long would truncate 64-bit numbers on 32-bit archs. Sponsored by: Google Summer of Code 2011
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/fstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index fe225a0..265791d 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -244,7 +244,7 @@ print_file_info(struct procstat *procstat, struct filestat *fst,
for (d = devs; d != NULL; d = d->next)
if (d->fsid == vn.vn_fsid) {
fsmatch = 1;
- if ((unsigned)d->ino == vn.vn_fileid) {
+ if (d->ino == vn.vn_fileid) {
filename = d->name;
break;
}
OpenPOWER on IntegriCloud