summaryrefslogtreecommitdiff
path: root/Cryptlib/SysCall/BaseStrings.c
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2021-03-23 23:49:46 +0000
committerSteve McIntyre <steve@einval.com>2021-03-23 23:49:46 +0000
commit1251a7ba86fc40a6aad8b4fecdbca2b61808d9fa (patch)
tree2125fda549aaca55cb49a48d54be77dec7fbf3df /Cryptlib/SysCall/BaseStrings.c
parent85b409232ce89b34626df9d72abedf5d4f5ccef6 (diff)
parent031e5cce385d3f96b1caa1d53495332a7eb03749 (diff)
downloadefi-boot-shim-debian/15.3-1.tar.gz
efi-boot-shim-debian/15.3-1.zip
Update upstream source from tag 'upstream/15.3'debian/15.3-1
Update to upstream version '15.3' with Debian dir 1b484f1c1ac270604a5a1451b34de4b0865c6211
Diffstat (limited to 'Cryptlib/SysCall/BaseStrings.c')
-rw-r--r--Cryptlib/SysCall/BaseStrings.c48
1 files changed, 9 insertions, 39 deletions
diff --git a/Cryptlib/SysCall/BaseStrings.c b/Cryptlib/SysCall/BaseStrings.c
index 252e6db3..29a16100 100644
--- a/Cryptlib/SysCall/BaseStrings.c
+++ b/Cryptlib/SysCall/BaseStrings.c
@@ -1,9 +1,9 @@
#include <OpenSslSupport.h>
-char *
-AsciiStrCat(char *Destination, char *Source)
+CHAR8 *
+AsciiStrCat(CHAR8 *Destination, const CHAR8 *Source)
{
- UINTN dest_len = strlena((CHAR8 *)Destination);
+ UINTN dest_len = strlen((CHAR8 *)Destination);
UINTN i;
for (i = 0; Source[i] != '\0'; i++)
@@ -14,7 +14,7 @@ AsciiStrCat(char *Destination, char *Source)
}
CHAR8 *
-AsciiStrCpy(CHAR8 *Destination, CHAR8 *Source)
+AsciiStrCpy(CHAR8 *Destination, const CHAR8 *Source)
{
UINTN i;
@@ -25,8 +25,8 @@ AsciiStrCpy(CHAR8 *Destination, CHAR8 *Source)
return Destination;
}
-char *
-AsciiStrnCpy(char *Destination, char *Source, UINTN count)
+CHAR8 *
+AsciiStrnCpy(CHAR8 *Destination, const CHAR8 *Source, UINTN count)
{
UINTN i;
@@ -59,45 +59,15 @@ WriteUnaligned32(UINT32 *Buffer, UINT32 Value)
}
UINTN
-AsciiStrSize(CHAR8 *string)
+AsciiStrSize(const CHAR8 *string)
{
- return strlena(string) + 1;
-}
-
-int
-strcmp (const char *str1, const char *str2)
-{
- return strcmpa((CHAR8 *)str1,(CHAR8 *)str2);
-}
-
-inline static char
-toupper (char c)
-{
- return ((c >= 'a' && c <= 'z') ? c - ('a' - 'A') : c);
-}
-
-/* Based on AsciiStriCmp() in edk2 MdePkg/Library/BaseLib/String.c */
-int
-strcasecmp (const char *str1, const char *str2)
-{
- char c1, c2;
-
- c1 = toupper (*str1);
- c2 = toupper (*str2);
- while ((*str1 != '\0') && (c1 == c2)) {
- str1++;
- str2++;
- c1 = toupper (*str1);
- c2 = toupper (*str2);
- }
-
- return c1 - c2;
+ return strlen(string) + 1;
}
/* Based on AsciiStrDecimalToUintnS() in edk2
* MdePkg/Library/BaseLib/SafeString.c */
UINTN
-AsciiStrDecimalToUintn(const char *String)
+AsciiStrDecimalToUintn(const CHAR8 *String)
{
UINTN Result;