diff options
| author | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2017-09-13 12:09:40 -0700 |
|---|---|---|
| committer | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2017-09-13 12:09:40 -0700 |
| commit | 8de1d1dc3a96fec12e97eff6ca5b728e606764b1 (patch) | |
| tree | 4f251a469423bb40dd7f5da9d74cf638c89832cb /Cryptlib/SysCall/BaseStrings.c | |
| parent | a97c2654996184b9a327630bc020f24f70a8b0da (diff) | |
| parent | b6f94dbeacfc6f0a507413096189304c58dbe66c (diff) | |
| download | efi-boot-shim-8de1d1dc3a96fec12e97eff6ca5b728e606764b1.tar.gz efi-boot-shim-8de1d1dc3a96fec12e97eff6ca5b728e606764b1.zip | |
Updated version 13~git1505328970.9c1c35c5 from 'upstream/13_git1505328970.9c1c35c5'
with Debian dir 676fec75f526e6b8072deb5302628d27abfc7449
Diffstat (limited to 'Cryptlib/SysCall/BaseStrings.c')
| -rw-r--r-- | Cryptlib/SysCall/BaseStrings.c | 62 |
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; +} |
