Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/udf It is meaningless to check the root node if there...



details:   https://anonhg.NetBSD.org/src/rev/4439251e2a68
branches:  trunk
changeset: 343302:4439251e2a68
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 29 10:42:30 2016 +0000

description:
It is meaningless to check the root node if there was an error.

diffstat:

 sys/fs/udf/udf_vfsops.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r e7244a3e40f0 -r 4439251e2a68 sys/fs/udf/udf_vfsops.c
--- a/sys/fs/udf/udf_vfsops.c   Fri Jan 29 04:15:46 2016 +0000
+++ b/sys/fs/udf/udf_vfsops.c   Fri Jan 29 10:42:30 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_vfsops.c,v 1.71 2015/08/24 08:31:56 hannken Exp $ */
+/* $NetBSD: udf_vfsops.c,v 1.72 2016/01/29 10:42:30 christos Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.71 2015/08/24 08:31:56 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.72 2016/01/29 10:42:30 christos Exp $");
 #endif /* not lint */
 
 
@@ -756,10 +756,11 @@
        dir_loc = &ump->fileset_desc->rootdir_icb;
        error = udf_get_node(ump, dir_loc, &root_dir);
 
+       if (error)
+               return error;
+
        if (!root_dir)
                error = ENOENT;
-       if (error)
-               return error;
 
        vp = root_dir->vnode;
        KASSERT(vp->v_vflag & VV_ROOT);



Home | Main Index | Thread Index | Old Index