Revision: 19592 http://sourceforge.net/p/edk2/code/19592 Author: jiaxinwu Date: 2016-01-06 00:55:38 +0000 (Wed, 06 Jan 2016) Log Message: ----------- NetworkPkg: Removing or adding some ASSERT statement
Refine the code by removing or adding some ASSERT statement to make the code more readable. Cc: Ye Ting <ting...@intel.com> Cc: Fu Siyuan <siyuan...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Reviewed-by: Fu Siyuan <siyuan...@intel.com> Reviewed-by: Ye Ting <ting...@intel.com> Modified Paths: -------------- trunk/edk2/NetworkPkg/DnsDxe/DnsImpl.c trunk/edk2/NetworkPkg/DnsDxe/DnsProtocol.c Modified: trunk/edk2/NetworkPkg/DnsDxe/DnsImpl.c =================================================================== --- trunk/edk2/NetworkPkg/DnsDxe/DnsImpl.c 2016-01-06 00:55:12 UTC (rev 19591) +++ trunk/edk2/NetworkPkg/DnsDxe/DnsImpl.c 2016-01-06 00:55:38 UTC (rev 19592) @@ -1360,8 +1360,6 @@ // Check whether it's the GeneralLookUp querying. // if (Instance->Service->IpVersion == IP_VERSION_4 && Dns4TokenEntry->GeneralLookUp) { - ASSERT (Dns4TokenEntry != NULL); - Dns4RR = Dns4TokenEntry->Token->RspData.GLookupData->RRList; AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection); @@ -1387,8 +1385,6 @@ RRCount ++; } else if (Instance->Service->IpVersion == IP_VERSION_6 && Dns6TokenEntry->GeneralLookUp) { - ASSERT (Dns6TokenEntry != NULL); - Dns6RR = Dns6TokenEntry->Token->RspData.GLookupData->RRList; AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection); Modified: trunk/edk2/NetworkPkg/DnsDxe/DnsProtocol.c =================================================================== --- trunk/edk2/NetworkPkg/DnsDxe/DnsProtocol.c 2016-01-06 00:55:12 UTC (rev 19591) +++ trunk/edk2/NetworkPkg/DnsDxe/DnsProtocol.c 2016-01-06 00:55:38 UTC (rev 19592) @@ -462,6 +462,8 @@ goto ON_EXIT; } + ASSERT (Packet != NULL); + // // Save the token into the Dns4TxTokens map. // @@ -635,6 +637,8 @@ goto ON_EXIT; } + ASSERT (Packet != NULL); + // // Save the token into the Dns4TxTokens map. // @@ -1231,6 +1235,8 @@ goto ON_EXIT; } + ASSERT (Packet != NULL); + // // Save the token into the Dns6TxTokens map. // @@ -1404,6 +1410,8 @@ goto ON_EXIT; } + ASSERT (Packet != NULL); + // // Save the token into the Dns6TxTokens map. // ------------------------------------------------------------------------------ _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits