Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ffs everywhere else it is assumed that the filesyste...



details:   https://anonhg.NetBSD.org/src/rev/3dec2ee25aef
branches:  trunk
changeset: 778978:3dec2ee25aef
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon Apr 23 17:19:00 2012 +0000

description:
everywhere else it is assumed that the filesystem block size fits into
a 32-bit "int" -- do the cast to quell a compiler warning in a more
sensible way

diffstat:

 sys/ufs/ffs/fs.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (27 lines):

diff -r 804bf137ab49 -r 3dec2ee25aef sys/ufs/ffs/fs.h
--- a/sys/ufs/ffs/fs.h  Mon Apr 23 15:09:13 2012 +0000
+++ b/sys/ufs/ffs/fs.h  Mon Apr 23 17:19:00 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fs.h,v 1.58 2012/04/20 02:07:43 christos Exp $ */
+/*     $NetBSD: fs.h,v 1.59 2012/04/23 17:19:00 drochner Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -704,13 +704,13 @@
  */
 #define        blksize(fs, ip, lbn) \
        (((lbn) >= NDADDR || (ip)->i_size >= lblktosize(fs, (lbn) + 1)) \
-           ? (uint64_t)(fs)->fs_bsize \
-           : (fragroundup(fs, blkoff(fs, (ip)->i_size))))
+           ? (fs)->fs_bsize \
+           : ((int32_t)fragroundup(fs, blkoff(fs, (ip)->i_size))))
 
 #define        sblksize(fs, size, lbn) \
        (((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \
-         ? (uint64_t)(fs)->fs_bsize \
-         : (fragroundup(fs, blkoff(fs, (uint64_t)(size)))))
+         ? (fs)->fs_bsize \
+         : ((int32_t)fragroundup(fs, blkoff(fs, (uint64_t)(size)))))
 
 
 /*



Home | Main Index | Thread Index | Old Index