Refine the code by removing or adding some ASSERT statement
to make the code more readable.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19592
6f19259b-4bc3-4df7-8a09-
765794883524
// Check whether it's the GeneralLookUp querying.\r
//\r
if (Instance->Service->IpVersion == IP_VERSION_4 && Dns4TokenEntry->GeneralLookUp) {\r
- ASSERT (Dns4TokenEntry != NULL);\r
- \r
Dns4RR = Dns4TokenEntry->Token->RspData.GLookupData->RRList;\r
AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection);\r
\r
\r
RRCount ++;\r
} else if (Instance->Service->IpVersion == IP_VERSION_6 && Dns6TokenEntry->GeneralLookUp) {\r
- ASSERT (Dns6TokenEntry != NULL);\r
- \r
Dns6RR = Dns6TokenEntry->Token->RspData.GLookupData->RRList;\r
AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection);\r
\r
goto ON_EXIT;\r
}\r
\r
+ ASSERT (Packet != NULL);\r
+\r
//\r
// Save the token into the Dns4TxTokens map.\r
//\r
goto ON_EXIT;\r
}\r
\r
+ ASSERT (Packet != NULL);\r
+\r
//\r
// Save the token into the Dns4TxTokens map.\r
//\r
goto ON_EXIT;\r
}\r
\r
+ ASSERT (Packet != NULL);\r
+\r
//\r
// Save the token into the Dns6TxTokens map.\r
//\r
goto ON_EXIT;\r
}\r
\r
+ ASSERT (Packet != NULL);\r
+\r
//\r
// Save the token into the Dns6TxTokens map.\r
//\r