46968b6
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
46968b6
From: Peter Jones <pjones@redhat.com>
46968b6
Date: Mon, 20 Jul 2020 12:24:02 -0400
46968b6
Subject: [PATCH] Fix const char ** pointers in grub-core/net/efi/ip4_config.c
46968b6
46968b6
This will need to get folded back in the right place on the next rebase,
46968b6
but it's before "Make grub_strtol() "end" pointers have safer const
46968b6
qualifiers" currently, so for now I'm leaving it here instead of merging
46968b6
it back with the original patch.
46968b6
46968b6
Signed-off-by: Peter Jones <pjones@redhat.com>
46968b6
---
46968b6
 grub-core/net/efi/ip4_config.c | 5 +++--
46968b6
 1 file changed, 3 insertions(+), 2 deletions(-)
46968b6
46968b6
diff --git a/grub-core/net/efi/ip4_config.c b/grub-core/net/efi/ip4_config.c
e622855
index 9725e928f7..cb880fc3e8 100644
46968b6
--- a/grub-core/net/efi/ip4_config.c
46968b6
+++ b/grub-core/net/efi/ip4_config.c
46968b6
@@ -61,7 +61,8 @@ int
46968b6
 grub_efi_string_to_ip4_address (const char *val, grub_efi_ipv4_address_t *address, const char **rest)
46968b6
 {
46968b6
   grub_uint32_t newip = 0;
46968b6
-  int i, ncolon = 0;
46968b6
+  grub_size_t i;
46968b6
+  int ncolon = 0;
46968b6
   const char *ptr = val;
46968b6
 
46968b6
   /* Check that is not an IPv6 address */
46968b6
@@ -78,7 +79,7 @@ grub_efi_string_to_ip4_address (const char *val, grub_efi_ipv4_address_t *addres
46968b6
   for (i = 0; i < 4; i++)
46968b6
     {
46968b6
       unsigned long t;
46968b6
-      t = grub_strtoul (ptr, (char **) &ptr, 0);
46968b6
+      t = grub_strtoul (ptr, &ptr, 0);
46968b6
       if (grub_errno)
46968b6
 	{
46968b6
 	  grub_errno = GRUB_ERR_NONE;