Revision: 17310 http://sourceforge.net/p/edk2/code/17310 Author: jyao1 Date: 2015-05-06 00:46:51 +0000 (Wed, 06 May 2015) Log Message: ----------- Add ASSERT comment for SafeString API in BaseLib for MdePkg.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen....@intel.com> Reviewed-by: "Carsey, Jaben" <jaben.car...@intel.com> Reviewed-by: "Justen, Jordan L" <jordan.l.jus...@intel.com> Reviewed-by: "Gao, Liming" <liming....@intel.com> Modified Paths: -------------- trunk/edk2/MdePkg/Include/Library/BaseLib.h trunk/edk2/MdePkg/Library/BaseLib/SafeString.c Modified: trunk/edk2/MdePkg/Include/Library/BaseLib.h =================================================================== --- trunk/edk2/MdePkg/Include/Library/BaseLib.h 2015-05-05 15:51:44 UTC (rev 17309) +++ trunk/edk2/MdePkg/Include/Library/BaseLib.h 2015-05-06 00:46:51 UTC (rev 17310) @@ -211,6 +211,7 @@ If Destination is not aligned on a 16-bit boundary, then ASSERT(). If Source is not aligned on a 16-bit boundary, then ASSERT(). + If an error would be returned, then the function will also ASSERT(). @param Destination A pointer to a Null-terminated Unicode string. @param DestMax The maximum number of Destination Unicode @@ -242,6 +243,7 @@ If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT(). If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT(). + If an error would be returned, then the function will also ASSERT(). @param Destination A pointer to a Null-terminated Unicode string. @param DestMax The maximum number of Destination Unicode @@ -275,6 +277,7 @@ If Destination is not aligned on a 16-bit boundary, then ASSERT(). If Source is not aligned on a 16-bit boundary, then ASSERT(). + If an error would be returned, then the function will also ASSERT(). @param Destination A pointer to a Null-terminated Unicode string. @param DestMax The maximum number of Destination Unicode @@ -309,7 +312,8 @@ set to null. If Destination is not aligned on a 16-bit boundary, then ASSERT(). - If and Source is not aligned on a 16-bit boundary, then ASSERT(). + If Source is not aligned on a 16-bit boundary, then ASSERT(). + If an error would be returned, then the function will also ASSERT(). @param Destination A pointer to a Null-terminated Unicode string. @param DestMax The maximum number of Destination Unicode @@ -362,6 +366,8 @@ Copies the string pointed to by Source (including the terminating null char) to the array pointed to by Destination. + If an error would be returned, then the function will also ASSERT(). + @param Destination A pointer to a Null-terminated Ascii string. @param DestMax The maximum number of Destination Ascii char, including terminating null char. @@ -390,6 +396,8 @@ Source to the array pointed to by Destination. If no null char is copied from Source, then Destination[Length] is always set to null. + If an error would be returned, then the function will also ASSERT(). + @param Destination A pointer to a Null-terminated Ascii string. @param DestMax The maximum number of Destination Ascii char, including terminating null char. @@ -420,6 +428,8 @@ Appends a copy of the string pointed to by Source (including the terminating null char) to the end of the string pointed to by Destination. + If an error would be returned, then the function will also ASSERT(). + @param Destination A pointer to a Null-terminated Ascii string. @param DestMax The maximum number of Destination Ascii char, including terminating null char. @@ -452,6 +462,8 @@ copied from Source, then Destination[StrLen(Destination) + Length] is always set to null. + If an error would be returned, then the function will also ASSERT(). + @param Destination A pointer to a Null-terminated Ascii string. @param DestMax The maximum number of Destination Ascii char, including terminating null char. Modified: trunk/edk2/MdePkg/Library/BaseLib/SafeString.c =================================================================== --- trunk/edk2/MdePkg/Library/BaseLib/SafeString.c 2015-05-05 15:51:44 UTC (rev 17309) +++ trunk/edk2/MdePkg/Library/BaseLib/SafeString.c 2015-05-06 00:46:51 UTC (rev 17310) @@ -153,6 +153,7 @@ If Destination is not aligned on a 16-bit boundary, then ASSERT(). If Source is not aligned on a 16-bit boundary, then ASSERT(). + If an error would be returned, then the function will also ASSERT(). @param Destination A pointer to a Null-terminated Unicode string. @param DestMax The maximum number of Destination Unicode @@ -230,6 +231,7 @@ If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT(). If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT(). + If an error would be returned, then the function will also ASSERT(). @param Destination A pointer to a Null-terminated Unicode string. @param DestMax The maximum number of Destination Unicode @@ -318,6 +320,7 @@ If Destination is not aligned on a 16-bit boundary, then ASSERT(). If Source is not aligned on a 16-bit boundary, then ASSERT(). + If an error would be returned, then the function will also ASSERT(). @param Destination A pointer to a Null-terminated Unicode string. @param DestMax The maximum number of Destination Unicode @@ -413,7 +416,8 @@ set to null. If Destination is not aligned on a 16-bit boundary, then ASSERT(). - If and Source is not aligned on a 16-bit boundary, then ASSERT(). + If Source is not aligned on a 16-bit boundary, then ASSERT(). + If an error would be returned, then the function will also ASSERT(). @param Destination A pointer to a Null-terminated Unicode string. @param DestMax The maximum number of Destination Unicode @@ -557,6 +561,8 @@ Copies the string pointed to by Source (including the terminating null char) to the array pointed to by Destination. + If an error would be returned, then the function will also ASSERT(). + @param Destination A pointer to a Null-terminated Ascii string. @param DestMax The maximum number of Destination Ascii char, including terminating null char. @@ -628,6 +634,8 @@ Source to the array pointed to by Destination. If no null char is copied from Source, then Destination[Length] is always set to null. + If an error would be returned, then the function will also ASSERT(). + @param Destination A pointer to a Null-terminated Ascii string. @param DestMax The maximum number of Destination Ascii char, including terminating null char. @@ -710,6 +718,8 @@ Appends a copy of the string pointed to by Source (including the terminating null char) to the end of the string pointed to by Destination. + If an error would be returned, then the function will also ASSERT(). + @param Destination A pointer to a Null-terminated Ascii string. @param DestMax The maximum number of Destination Ascii char, including terminating null char. @@ -800,6 +810,8 @@ copied from Source, then Destination[StrLen(Destination) + Length] is always set to null. + If an error would be returned, then the function will also ASSERT(). + @param Destination A pointer to a Null-terminated Ascii string. @param DestMax The maximum number of Destination Ascii char, including terminating null char. ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits