- Return early if ProtocolNumber is too large

- Fixes coverity error 600

svn path=/branches/aicom-network-fixes/; revision=36525
This commit is contained in:
Cameron Gutman 2008-09-26 03:12:18 +00:00
parent d8398cc719
commit 9023e12475

View file

@ -352,10 +352,10 @@ VOID IPRegisterProtocol(
* To unregister a protocol handler, call this function with Handler = NULL * To unregister a protocol handler, call this function with Handler = NULL
*/ */
{ {
#ifdef DBG if (ProtocolNumber >= IP_PROTOCOL_TABLE_SIZE) {
if (ProtocolNumber >= IP_PROTOCOL_TABLE_SIZE)
TI_DbgPrint(MIN_TRACE, ("Protocol number is out of range (%d).\n", ProtocolNumber)); TI_DbgPrint(MIN_TRACE, ("Protocol number is out of range (%d).\n", ProtocolNumber));
#endif return;
}
ProtocolTable[ProtocolNumber] = Handler; ProtocolTable[ProtocolNumber] = Handler;
} }