/** @file\r
Network library functions providing net buffer operation support.\r
\r
-Copyright (c) 2005 - 2006, Intel Corporation.<BR>\r
+Copyright (c) 2005 - 2009, Intel Corporation.<BR>\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
// isn't NULL. If NET_VECTOR_OWN_FIRST is set, release the\r
// first block since it is allocated by us\r
//\r
- if (Vector->Flag & NET_VECTOR_OWN_FIRST) {\r
+ if ((Vector->Flag & NET_VECTOR_OWN_FIRST) != 0) {\r
gBS->FreePool (Vector->Block[0].Bulk);\r
}\r
\r
NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE);\r
\r
for (Index = 0; Index < Nbuf->BlockOpNum; Index++) {\r
- if (Nbuf->BlockOp[Index].Size) {\r
+ if (Nbuf->BlockOp[Index].Size != 0) {\r
Fragment[Current].Bulk = Nbuf->BlockOp[Index].Head;\r
Fragment[Current].Len = Nbuf->BlockOp[Index].Size;\r
Current++;\r
@param[in] Dest The destination of the data to copy to.\r
\r
@return The length of the actual copied data, or 0 if the offset\r
- specified exceeds exceeds the total size of net buffer.\r
+ specified exceeds the total size of net buffer.\r
\r
**/\r
UINT32\r
Cur += Nbuf->TotalSize;\r
}\r
\r
+ ASSERT (Nbuf != NULL);\r
+\r
//\r
// Copy the data in the first buffer.\r
//\r