Blame SOURCES/0137-Fix-const-char-pointers-in-grub-core-net-efi-ip4_con.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/ip4_config.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/ip4_config.c | 5 +++--
5593c8
 1 file changed, 3 insertions(+), 2 deletions(-)
5593c8
5593c8
diff --git a/grub-core/net/efi/ip4_config.c b/grub-core/net/efi/ip4_config.c
fd0330
index 9725e928f7..cb880fc3e8 100644
5593c8
--- a/grub-core/net/efi/ip4_config.c
5593c8
+++ b/grub-core/net/efi/ip4_config.c
5593c8
@@ -61,7 +61,8 @@ int
5593c8
 grub_efi_string_to_ip4_address (const char *val, grub_efi_ipv4_address_t *address, const char **rest)
5593c8
 {
5593c8
   grub_uint32_t newip = 0;
5593c8
-  int i, ncolon = 0;
5593c8
+  grub_size_t i;
5593c8
+  int ncolon = 0;
5593c8
   const char *ptr = val;
5593c8
 
5593c8
   /* Check that is not an IPv6 address */
5593c8
@@ -78,7 +79,7 @@ grub_efi_string_to_ip4_address (const char *val, grub_efi_ipv4_address_t *addres
5593c8
   for (i = 0; i < 4; i++)
5593c8
     {
5593c8
       unsigned long t;
5593c8
-      t = grub_strtoul (ptr, (char **) &ptr, 0);
5593c8
+      t = grub_strtoul (ptr, &ptr, 0);
5593c8
       if (grub_errno)
5593c8
 	{
5593c8
 	  grub_errno = GRUB_ERR_NONE;