8c6b1ac71e
Also include some minor fixes for gcc 5.1.1 Signed-off-by: Peter Jones <pjones@redhat.com>
45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
From 16a7e723ea37d4596348a76f54a6675c6e03fedc Mon Sep 17 00:00:00 2001
|
|
From: Andrei Borzenkov <arvidjaar@gmail.com>
|
|
Date: Thu, 7 May 2015 20:33:28 +0300
|
|
Subject: [PATCH 404/506] convert to, not from, CPU byte order in DNS receive
|
|
function
|
|
|
|
---
|
|
grub-core/net/dns.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c
|
|
index 0b771fb..9d0c8fc 100644
|
|
--- a/grub-core/net/dns.c
|
|
+++ b/grub-core/net/dns.c
|
|
@@ -262,7 +262,7 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
|
grub_netbuff_free (nb);
|
|
return GRUB_ERR_NONE;
|
|
}
|
|
- for (i = 0; i < grub_cpu_to_be16 (head->qdcount); i++)
|
|
+ for (i = 0; i < grub_be_to_cpu16 (head->qdcount); i++)
|
|
{
|
|
if (ptr >= nb->tail)
|
|
{
|
|
@@ -277,7 +277,7 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
|
ptr += 4;
|
|
}
|
|
*data->addresses = grub_malloc (sizeof ((*data->addresses)[0])
|
|
- * grub_cpu_to_be16 (head->ancount));
|
|
+ * grub_be_to_cpu16 (head->ancount));
|
|
if (!*data->addresses)
|
|
{
|
|
grub_errno = GRUB_ERR_NONE;
|
|
@@ -286,7 +286,7 @@ recv_hook (grub_net_udp_socket_t sock __attribute__ ((unused)),
|
|
}
|
|
reparse_ptr = ptr;
|
|
reparse:
|
|
- for (i = 0, ptr = reparse_ptr; i < grub_cpu_to_be16 (head->ancount); i++)
|
|
+ for (i = 0, ptr = reparse_ptr; i < grub_be_to_cpu16 (head->ancount); i++)
|
|
{
|
|
int ignored = 0;
|
|
grub_uint8_t class;
|
|
--
|
|
2.4.3
|
|
|