Module Name:    src
Committed By:   rmind
Date:           Sat Nov 23 21:53:27 UTC 2013

Modified Files:
        src/sys/fs/tmpfs: tmpfs_subr.c

Log Message:
tmpfs_reg_resize: use size_t.


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/fs/tmpfs/tmpfs_subr.c

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

Modified files:

Index: src/sys/fs/tmpfs/tmpfs_subr.c
diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.90 src/sys/fs/tmpfs/tmpfs_subr.c:1.91
--- src/sys/fs/tmpfs/tmpfs_subr.c:1.90	Sat Nov 23 16:35:32 2013
+++ src/sys/fs/tmpfs/tmpfs_subr.c	Sat Nov 23 21:53:27 2013
@@ -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 @@ tmpfs_reg_resize(struct vnode *vp, off_t
 			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));
 	}
 

Reply via email to