Module Name:    src
Committed By:   drochner
Date:           Mon Apr 23 17:19:01 UTC 2012

Modified Files:
        src/sys/ufs/ffs: fs.h

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/ufs/ffs/fs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/ffs/fs.h
diff -u src/sys/ufs/ffs/fs.h:1.58 src/sys/ufs/ffs/fs.h:1.59
--- src/sys/ufs/ffs/fs.h:1.58	Fri Apr 20 02:07:43 2012
+++ src/sys/ufs/ffs/fs.h	Mon Apr 23 17:19:00 2012
@@ -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 @@ struct ocg {
  */
 #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)))))
 
 
 /*

Reply via email to