summaryrefslogtreecommitdiff
path: root/httpboot.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 /httpboot.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 'httpboot.c')
-rw-r--r--httpboot.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/httpboot.c b/httpboot.c
index 7b976365..93d88931 100644
--- a/httpboot.c
+++ b/httpboot.c
@@ -7,10 +7,6 @@
* (http://tianocore.sf.net) and are Copyright 2009-2012 Intel
* Corporation.
*/
-
-#include <efi.h>
-#include <efilib.h>
-
#include "shim.h"
static UINTN
@@ -134,7 +130,7 @@ find_httpboot (EFI_HANDLE device)
/* Save the current URI */
UriNode = (URI_DEVICE_PATH *)Node;
- uri_size = strlena(UriNode->Uri);
+ uri_size = strlen(UriNode->Uri);
uri = AllocatePool(uri_size + 1);
if (!uri) {
perror(L"Failed to allocate uri\n");
@@ -160,10 +156,10 @@ generate_next_uri (CONST CHAR8 *current_uri, CONST CHAR8 *next_loader,
UINTN path_len = 0;
UINTN count = 0;
- if (strncmpa(current_uri, (CHAR8 *)"http://", 7) == 0) {
+ if (strncmp(current_uri, (CHAR8 *)"http://", 7) == 0) {
ptr = current_uri + 7;
count += 7;
- } else if (strncmpa(current_uri, (CHAR8 *)"https://", 8) == 0) {
+ } else if (strncmp(current_uri, (CHAR8 *)"https://", 8) == 0) {
ptr = current_uri + 8;
count += 8;
} else {
@@ -171,7 +167,7 @@ generate_next_uri (CONST CHAR8 *current_uri, CONST CHAR8 *next_loader,
}
/* Extract the path */
- next_len = strlena(next_loader);
+ next_len = strlen(next_loader);
while (*ptr != '\0') {
count++;
if (*ptr == '/')
@@ -196,9 +192,9 @@ extract_hostname (CONST CHAR8 *url, CHAR8 **hostname)
CONST CHAR8 *ptr, *start;
UINTN host_len = 0;
- if (strncmpa(url, (CHAR8 *)"http://", 7) == 0)
+ if (strncmp(url, (CHAR8 *)"http://", 7) == 0)
start = url + 7;
- else if (strncmpa(url, (CHAR8 *)"https://", 8) == 0)
+ else if (strncmp(url, (CHAR8 *)"https://", 8) == 0)
start = url + 8;
else
return EFI_INVALID_PARAMETER;
@@ -404,7 +400,7 @@ set_ip4(EFI_HANDLE *nic, IPv4_DEVICE_PATH *ip4node)
}
static VOID EFIAPI
-httpnotify (EFI_EVENT Event, VOID *Context)
+httpnotify (EFI_EVENT Event UNUSED, VOID *Context)
{
*((BOOLEAN *) Context) = TRUE;
}
@@ -575,7 +571,7 @@ receive_http_response(EFI_HTTP_PROTOCOL *http, VOID **buffer, UINT64 *buf_size)
/* Check the length of the file */
for (i = 0; i < rx_message.HeaderCount; i++) {
- if (!strcmpa(rx_message.Headers[i].FieldName, (CHAR8 *)"Content-Length")) {
+ if (!strcmp(rx_message.Headers[i].FieldName, (CHAR8 *)"Content-Length")) {
*buf_size = ascii_to_int(rx_message.Headers[i].FieldValue);
}
}