Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/cd9660 CID 1223346: No need to check bp against NULL....



details:   https://anonhg.NetBSD.org/src/rev/fc86c823cacb
branches:  trunk
changeset: 796848:fc86c823cacb
user:      hannken <hannken%NetBSD.org@localhost>
date:      Sun Jun 22 09:47:40 2014 +0000

description:
CID 1223346: No need to check bp against NULL.  It is always valid here.

diffstat:

 sys/fs/cd9660/cd9660_vfsops.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r 61b382051e68 -r fc86c823cacb sys/fs/cd9660/cd9660_vfsops.c
--- a/sys/fs/cd9660/cd9660_vfsops.c     Sun Jun 22 08:10:18 2014 +0000
+++ b/sys/fs/cd9660/cd9660_vfsops.c     Sun Jun 22 09:47:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660_vfsops.c,v 1.87 2014/06/16 09:55:49 hannken Exp $       */
+/*     $NetBSD: cd9660_vfsops.c,v 1.88 2014/06/22 09:47:40 hannken Exp $       */
 
 /*-
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.87 2014/06/16 09:55:49 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.88 2014/06/22 09:47:40 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -746,8 +746,7 @@
 
        if (off + isonum_711(isodir->length) > imp->logical_block_size) {
                pool_put(&cd9660_node_pool, ip);
-               if (bp != 0)
-                       brelse(bp, 0);
+               brelse(bp, 0);
                printf("fhtovp: directory crosses block boundary %d[off=%d/len=%d]\n",
                    off +isonum_711(isodir->length), off,
                    isonum_711(isodir->length));
@@ -800,8 +799,7 @@
                break;
        }
 
-       if (bp != 0)
-               brelse(bp, 0);
+       brelse(bp, 0);
 
        /*
         * Initialize the associated vnode



Home | Main Index | Thread Index | Old Index