nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0165-Fix-const-char-pointers-in-grub-core-net-efi-pxe.c.patch

5593c8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
5593c8
From: Peter Jones <pjones@redhat.com>
5593c8
Date: Mon, 20 Jul 2020 12:24:02 -0400
5593c8
Subject: [PATCH] Fix const char ** pointers in grub-core/net/efi/pxe.c
5593c8
5593c8
This will need to get folded back in the right place on the next rebase,
5593c8
but it's before "Make grub_strtol() "end" pointers have safer const
5593c8
qualifiers" currently, so for now I'm leaving it here instead of merging
5593c8
it back with the original patch.
5593c8
5593c8
Signed-off-by: Peter Jones <pjones@redhat.com>
5593c8
---
5593c8
 grub-core/net/efi/pxe.c | 6 +++---
5593c8
 1 file changed, 3 insertions(+), 3 deletions(-)
5593c8
5593c8
diff --git a/grub-core/net/efi/pxe.c b/grub-core/net/efi/pxe.c
5593c8
index 531949cba5c..73e2bb01c1b 100644
5593c8
--- a/grub-core/net/efi/pxe.c
5593c8
+++ b/grub-core/net/efi/pxe.c
5593c8
@@ -187,7 +187,7 @@ parse_ip6 (const char *val, grub_uint64_t *ip, const char **rest)
5593c8
 	  ptr++;
5593c8
 	  continue;
5593c8
 	}
5593c8
-      t = grub_strtoul (ptr, (char **) &ptr, 16);
5593c8
+      t = grub_strtoul (ptr, &ptr, 16);
5593c8
       if (grub_errno)
5593c8
 	{
5593c8
 	  grub_errno = GRUB_ERR_NONE;
5593c8
@@ -225,7 +225,7 @@ pxe_open (struct grub_efi_net_device *dev,
5593c8
 	  int type __attribute__((unused)))
5593c8
 {
5593c8
   int i;
5593c8
-  char *p;
5593c8
+  const char *p;
5593c8
   grub_efi_status_t status;
5593c8
   grub_efi_pxe_ip_address_t server_ip;
5593c8
   grub_efi_uint64_t file_size = 0;
5593c8
@@ -313,7 +313,7 @@ pxe_read (struct grub_efi_net_device *dev,
5593c8
 	  grub_size_t len)
5593c8
 {
5593c8
   int i;
5593c8
-  char *p;
5593c8
+  const char *p;
5593c8
   grub_efi_status_t status;
5593c8
   grub_efi_pxe_t *pxe = (prefer_ip6) ? dev->ip6_pxe : dev->ip4_pxe;
5593c8
   grub_efi_uint64_t bufsz = len;