diff options
| author | Peter Jones <pjones@redhat.com> | 2013-10-02 10:38:08 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2013-10-02 10:46:26 -0400 |
| commit | 322a0f9ef768ba3a2813bcca454c92163df03af2 (patch) | |
| tree | 08095d5aefc41c7c3f19dc816f1b977650d60ee5 /netboot.c | |
| parent | aec345c0b2e43e27ca49b5bdd6e22cd36a65b978 (diff) | |
| download | efi-boot-shim-322a0f9ef768ba3a2813bcca454c92163df03af2.tar.gz efi-boot-shim-322a0f9ef768ba3a2813bcca454c92163df03af2.zip | |
Use CHAR8 not UINT8 for character work.
This gets rid of a lot of type casting that we don't need, and helps
reduce warnings when I switch a bunch of gnu-efi stuff to taking const
arguments.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'netboot.c')
| -rw-r--r-- | netboot.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -52,7 +52,7 @@ static inline unsigned short int __swap16(unsigned short int x) static EFI_PXE_BASE_CODE *pxe; static EFI_IP_ADDRESS tftp_addr; -static UINT8 *full_path; +static CHAR8 *full_path; typedef struct { @@ -188,10 +188,10 @@ static CHAR8 *get_v6_bootfile_url(EFI_PXE_BASE_CODE_DHCPV6_PACKET *pkt) return NULL; } -static UINT16 str2ns(UINT8 *str) +static CHAR16 str2ns(CHAR8 *str) { - UINT16 ret = 0; - UINT8 v; + CHAR16 ret = 0; + CHAR8 v; for(;*str;str++) { if ('0' <= *str && *str <= '9') v = *str - '0'; @@ -206,18 +206,18 @@ static UINT16 str2ns(UINT8 *str) return htons(ret); } -static UINT8 *str2ip6(char *str) +static CHAR8 *str2ip6(CHAR8 *str) { UINT8 i, j, p; size_t len; - UINT8 *a, *b, t; + CHAR8 *a, *b, t; static UINT16 ip[8]; for(i=0; i < 8; i++) { ip[i] = 0; } - len = strlen((UINT8 *)str); - a = b = (UINT8 *)str; + len = strlen(str); + a = b = str; for(i=p=0; i < len; i++, b++) { if (*b != ':') continue; @@ -228,7 +228,7 @@ static UINT8 *str2ip6(char *str) if ( *(b+1) == ':' ) break; } - a = b = (UINT8 *)(str + len); + a = b = (str + len); for(j=len, p=7; j > i; j--, a--) { if (*a != ':') continue; @@ -238,13 +238,13 @@ static UINT8 *str2ip6(char *str) *b = t; b = a; } - return (UINT8 *)ip; + return (CHAR8 *)ip; } static BOOLEAN extract_tftp_info(CHAR8 *url) { CHAR8 *start, *end; - char ip6str[40]; + CHAR8 ip6str[40]; CHAR8 *template = (CHAR8 *)translate_slashes(DEFAULT_LOADER_CHAR); if (strncmp((UINT8 *)url, (UINT8 *)"tftp://", 7)) { |
