summaryrefslogtreecommitdiff
path: root/Cryptlib/SysCall/BaseStrings.c
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2017-09-13 12:09:40 -0700
committerMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2017-09-13 12:09:40 -0700
commitb6f94dbeacfc6f0a507413096189304c58dbe66c (patch)
treebce8c7db22209078618294c51d95a0c033aec7d9 /Cryptlib/SysCall/BaseStrings.c
parent25f7fd1fb389a5f6356f353d16c5ead80dac6bbc (diff)
downloadefi-boot-shim-b6f94dbeacfc6f0a507413096189304c58dbe66c.tar.gz
efi-boot-shim-b6f94dbeacfc6f0a507413096189304c58dbe66c.zip
New upstream version 13~git1505328970.9c1c35c5upstream/13_git1505328970.9c1c35c5
Diffstat (limited to 'Cryptlib/SysCall/BaseStrings.c')
-rw-r--r--Cryptlib/SysCall/BaseStrings.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/Cryptlib/SysCall/BaseStrings.c b/Cryptlib/SysCall/BaseStrings.c
index 2267d862..252e6db3 100644
--- a/Cryptlib/SysCall/BaseStrings.c
+++ b/Cryptlib/SysCall/BaseStrings.c
@@ -1,4 +1,4 @@
-#include <CrtLibSupport.h>
+#include <OpenSslSupport.h>
char *
AsciiStrCat(char *Destination, char *Source)
@@ -64,36 +64,6 @@ AsciiStrSize(CHAR8 *string)
return strlena(string) + 1;
}
-/* Based on AsciiStrDecimalToUintnS() in edk2
- * MdePkg/Library/BaseLib/SafeString.c */
-UINTN
-AsciiStrDecimalToUintn(const char *String)
-{
- UINTN Result;
-
- if (String == NULL)
- return 0;
-
- /* Ignore the pad spaces (space or tab) */
- while ((*String == ' ') || (*String == '\t')) {
- String++;
- }
-
- /* Ignore leading Zeros after the spaces */
- while (*String == '0') {
- String++;
- }
-
- Result = 0;
-
- while (*String >= '0' && *String <= '9') {
- Result = Result * 10 + (*String - '0');
- String++;
- }
-
- return Result;
-}
-
int
strcmp (const char *str1, const char *str2)
{
@@ -123,3 +93,33 @@ strcasecmp (const char *str1, const char *str2)
return c1 - c2;
}
+
+/* Based on AsciiStrDecimalToUintnS() in edk2
+ * MdePkg/Library/BaseLib/SafeString.c */
+UINTN
+AsciiStrDecimalToUintn(const char *String)
+{
+ UINTN Result;
+
+ if (String == NULL)
+ return 0;
+
+ /* Ignore the pad spaces (space or tab) */
+ while ((*String == ' ') || (*String == '\t')) {
+ String++;
+ }
+
+ /* Ignore leading Zeros after the spaces */
+ while (*String == '0') {
+ String++;
+ }
+
+ Result = 0;
+
+ while (*String >= '0' && *String <= '9') {
+ Result = Result * 10 + (*String - '0');
+ String++;
+ }
+
+ return Result;
+}