diff options
Diffstat (limited to 'httpboot.c')
-rw-r--r-- | httpboot.c | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -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); } } |