Coverity-updates archive

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

New Defects reported by Coverity Scan for NetBSD-i386-kernel



Hi,
Please find the latest report on new defect(s) introduced to NetBSD-i386-kernel found with Coverity Scan.
2 new defect(s) introduced to NetBSD-i386-kernel found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1304138: Control flow issues (DEADCODE)
/sys/ufs/lfs/lfs_vnops.c: 788 in lfs_mknod()
________________________________________________________________________________________________________
*** CID 1304138: Control flow issues (DEADCODE)
/sys/ufs/lfs/lfs_vnops.c: 788 in lfs_mknod()
782 		 (unsigned long long)ino);
783 		/* return (error); */
784 	}
785 
786 	fstrans_done(ap->a_dvp->v_mount);
787 	if (error != 0) {
>>> CID 1304138: Control flow issues (DEADCODE)
>>> Execution cannot reach this statement: "*vpp = NULL;".
788 		*vpp = NULL;
789 		return (error);
790 	}
791 	VOP_UNLOCK(*vpp);
792 	return (0);
793 }
** CID 1304139: Incorrect expression (IDENTICAL_BRANCHES)
/sys/ufs/lfs/lfs_segment.c: 601 in lfs_writevnodes()
________________________________________________________________________________________________________
*** CID 1304139: Incorrect expression (IDENTICAL_BRANCHES)
/sys/ufs/lfs/lfs_segment.c: 601 in lfs_writevnodes()
595 				}
596 				(void) lfs_writeinode(fs, sp, ip);
597 				inodes_written++;
598 			}
599 		}
600 
>>> CID 1304139: Incorrect expression (IDENTICAL_BRANCHES)
>>> The same code is executed regardless of whether "lfs_clean_vnhead && only_cleaning" is true, because the 'then' and 'else' branches are identical. Should one of the branches be modified, or the entire 'if' statement replaced?
601 		if (lfs_clean_vnhead && only_cleaning)
602 			vrele(vp);
603 		else
604 			vrele(vp);
605 
606 		mutex_enter(&mntvnode_lock);
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/1450?tab=overview
To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782 .


Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /