If the Bug Check flag is set, the call to AFSBreakPoint() in
AFSExAllocatePoolWithTag() will trigger. There is no need for
an explicit bug check test in AFSExAllocatePoolWithTag().
If AFSExAllocatePoolWithTag() returns NULL there is no need
to ASSERT() the return value since AFSBreakPoint() would already
have been called to signal a debugger.
Change-Id: Ie8564f41f811c3afd99dc2e9c02f4aa68d63ef8e
Reviewed-on: http://gerrit.openafs.org/6780
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
if( pBuffer == NULL)
{
- if( BooleanFlagOn( AFSDebugFlags, AFS_DBG_BUGCHECK_EXCEPTION))
- {
-
- KeBugCheck( (ULONG)-2);
- }
- else
- {
-
- AFSDbgLogMsg( 0,
- 0,
- "AFSExAllocatePoolWithTag failure Type %08lX Size %08lX Tag %08lX %08lX\n",
- PoolType,
- NumberOfBytes,
- Tag,
- PsGetCurrentThread());
+ AFSDbgLogMsg( 0,
+ 0,
+ "AFSExAllocatePoolWithTag failure Type %08lX Size %08lX Tag %08lX %08lX\n",
+ PoolType,
+ NumberOfBytes,
+ Tag,
+ PsGetCurrentThread());
- switch ( Tag ) {
+ switch ( Tag ) {
- case AFS_GENERIC_MEMORY_21_TAG:
- case AFS_GENERIC_MEMORY_22_TAG:
- // AFSDumpTraceFiles -- do nothing;
- break;
+ case AFS_GENERIC_MEMORY_21_TAG:
+ case AFS_GENERIC_MEMORY_22_TAG:
+ // AFSDumpTraceFiles -- do nothing;
+ break;
- default:
- AFSBreakPoint();
- }
+ default:
+ AFSBreakPoint();
}
}
if (NULL == pExtent)
{
- ASSERT( FALSE);
-
try_return (ntStatus = STATUS_INSUFFICIENT_RESOURCES );
}