Module Name: src
Committed By: martin
Date: Thu Jul 1 15:53:20 UTC 2021
Modified Files:
src/sys/kern: vfs_vnops.c
Log Message:
gcc (with some options) eroneously claims we would use "vp" uninitialized,
so initialize it as NULL.
To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/kern/vfs_vnops.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/kern/vfs_vnops.c
diff -u src/sys/kern/vfs_vnops.c:1.219 src/sys/kern/vfs_vnops.c:1.220
--- src/sys/kern/vfs_vnops.c:1.219 Thu Jul 1 04:25:51 2021
+++ src/sys/kern/vfs_vnops.c Thu Jul 1 15:53:20 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnops.c,v 1.219 2021/07/01 04:25:51 christos Exp $ */
+/* $NetBSD: vfs_vnops.c,v 1.220 2021/07/01 15:53:20 martin Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.219 2021/07/01 04:25:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnops.c,v 1.220 2021/07/01 15:53:20 martin Exp $");
#include "veriexec.h"
@@ -164,7 +164,7 @@ vn_open(struct vnode *at_dvp, struct pat
struct vnode **ret_vp, bool *ret_domove, int *ret_fd)
{
struct nameidata nd;
- struct vnode *vp;
+ struct vnode *vp = NULL;
struct lwp *l = curlwp;
kauth_cred_t cred = l->l_cred;
struct vattr va;