Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/tmpfs do no access uninitialized variables in KASSERT...
details: https://anonhg.NetBSD.org/src/rev/e75a13e13808
branches: trunk
changeset: 814224:e75a13e13808
user: kardel <kardel%NetBSD.org@localhost>
date: Sat Mar 12 10:51:00 2016 +0000
description:
do no access uninitialized variables in KASSERTs - fixes build
diffstat:
sys/fs/tmpfs/tmpfs_vnops.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r f51422e018cd -r e75a13e13808 sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c Sat Mar 12 08:55:54 2016 +0000
+++ b/sys/fs/tmpfs/tmpfs_vnops.c Sat Mar 12 10:51:00 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_vnops.c,v 1.124 2016/03/12 08:51:13 joerg Exp $ */
+/* $NetBSD: tmpfs_vnops.c,v 1.125 2016/03/12 10:51:00 kardel Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.124 2016/03/12 08:51:13 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.125 2016/03/12 10:51:00 kardel Exp $");
#include <sys/param.h>
#include <sys/dirent.h>
@@ -572,14 +572,14 @@
KASSERT(VOP_ISLOCKED(vp));
+ node = VP_TO_TMPFS_NODE(vp);
+ oldsize = node->tn_size;
+
if ((vp->v_mount->mnt_flag & MNT_RDONLY) != 0) {
error = EROFS;
goto out;
}
- node = VP_TO_TMPFS_NODE(vp);
- oldsize = node->tn_size;
-
if (uio->uio_offset < 0 || vp->v_type != VREG) {
error = EINVAL;
goto out;
Home |
Main Index |
Thread Index |
Old Index