nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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