nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0161-Fix-const-char-pointers-in-grub-core-net-bootp.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/bootp.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/bootp.c | 4 ++--
5593c8
 1 file changed, 2 insertions(+), 2 deletions(-)
5593c8
5593c8
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
5593c8
index 8fb8918ae7e..7baf3540c81 100644
5593c8
--- a/grub-core/net/bootp.c
5593c8
+++ b/grub-core/net/bootp.c
5593c8
@@ -329,7 +329,7 @@ grub_net_configure_by_dhcp_ack (const char *name,
5593c8
   struct grub_net_network_level_interface *inter;
5593c8
   int mask = -1;
5593c8
   char server_ip[sizeof ("xxx.xxx.xxx.xxx")];
5593c8
-  const grub_uint8_t *opt;
5593c8
+  const char *opt;
5593c8
   grub_uint8_t opt_len, overload = 0;
5593c8
   const char *boot_file = 0, *server_name = 0;
5593c8
   grub_size_t boot_file_len, server_name_len;
5593c8
@@ -505,7 +505,7 @@ grub_net_configure_by_dhcp_ack (const char *name,
5593c8
   if (opt && opt_len)
5593c8
     {
5593c8
       grub_env_set_net_property (name, "vendor_class_identifier", (const char *) opt, opt_len);
5593c8
-      if (opt && grub_strcmp (opt, "HTTPClient") == 0)
5593c8
+      if (opt && grub_strcmp ((char *)opt, "HTTPClient") == 0)
5593c8
         {
5593c8
           char *proto, *ip, *pa;
5593c8