KASSERT that condition raised by Coverity cannot happen.

Found by:	Coverity Prevent (tm)
KASSERT by:	sam
This commit is contained in:
Kirk McKusick 2010-01-07 06:20:07 +00:00
parent 0d7e26de54
commit 445e33e4ac

View File

@ -632,6 +632,7 @@ ufsdirhash_lookup(struct inode *ip, char *name, int namelen, doff_t *offp,
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))) {