summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2010-01-07 06:20:07 +0000
committermckusick <mckusick@FreeBSD.org>2010-01-07 06:20:07 +0000
commit3d4c810fbed5abd3f583bb74b53125f3fdcdf5da (patch)
tree3de4819fcfe7cd8e1a5afe8af91833e1c246aecf /sys/ufs
parent89827f3cc8f49694e2ca4184459f2af20fb32897 (diff)
downloadFreeBSD-src-3d4c810fbed5abd3f583bb74b53125f3fdcdf5da.zip
FreeBSD-src-3d4c810fbed5abd3f583bb74b53125f3fdcdf5da.tar.gz
KASSERT that condition raised by Coverity cannot happen.
Found by: Coverity Prevent (tm) KASSERT by: sam
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_dirhash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c
index e18b838..c85fdc8 100644
--- a/sys/ufs/ufs/ufs_dirhash.c
+++ b/sys/ufs/ufs/ufs_dirhash.c
@@ -632,6 +632,7 @@ restart:
goto fail;
}
}
+ KASSERT(bp != NULL, ("no buffer allocated"));
dp = (struct direct *)(bp->b_data + (offset & bmask));
if (dp->d_reclen == 0 || dp->d_reclen >
DIRBLKSIZ - (offset & (DIRBLKSIZ - 1))) {
OpenPOWER on IntegriCloud