Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/tmpfs tmpfs_reg_resize: use size_t.



details:   https://anonhg.NetBSD.org/src/rev/f57adbd7a8fa
branches:  trunk
changeset: 791569:f57adbd7a8fa
user:      rmind <rmind%NetBSD.org@localhost>
date:      Sat Nov 23 21:53:27 2013 +0000

description:
tmpfs_reg_resize: use size_t.

diffstat:

 sys/fs/tmpfs/tmpfs_subr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 0534ac1cde5e -r f57adbd7a8fa sys/fs/tmpfs/tmpfs_subr.c
--- a/sys/fs/tmpfs/tmpfs_subr.c Sat Nov 23 20:56:41 2013 +0000
+++ b/sys/fs/tmpfs/tmpfs_subr.c Sat Nov 23 21:53:27 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs_subr.c,v 1.90 2013/11/23 16:35:32 rmind Exp $    */
+/*     $NetBSD: tmpfs_subr.c,v 1.91 2013/11/23 21:53:27 rmind Exp $    */
 
 /*
  * Copyright (c) 2005-2013 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.90 2013/11/23 16:35:32 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.91 2013/11/23 21:53:27 rmind Exp $");
 
 #include <sys/param.h>
 #include <sys/cprng.h>
@@ -894,8 +894,9 @@
                        return ENOSPC;
                }
        } else if (newsize < oldsize) {
-               int zerolen = MIN(round_page(newsize), node->tn_size) - newsize;
+               size_t zerolen;
 
+               zerolen = MIN(round_page(newsize), node->tn_size) - newsize;
                ubc_zerorange(uobj, newsize, zerolen, UBC_UNMAP_FLAG(vp));
        }
 



Home | Main Index | Thread Index | Old Index