Blame SOURCES/0420-gfxmenu-gui_list-Remove-code-that-coverity-is-flaggi.patch

9723a8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
9723a8
From: Darren Kenny <darren.kenny@oracle.com>
9723a8
Date: Mon, 7 Dec 2020 14:44:47 +0000
9723a8
Subject: [PATCH] gfxmenu/gui_list: Remove code that coverity is flagging as
9723a8
 dead
9723a8
9723a8
The test of value for NULL before calling grub_strdup() is not required,
9723a8
since the if condition prior to this has already tested for value being
9723a8
NULL and cannot reach this code if it is.
9723a8
9723a8
Fixes: CID 73659
9723a8
9723a8
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
9723a8
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
9723a8
---
9723a8
 grub-core/gfxmenu/gui_list.c | 2 +-
9723a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9723a8
9723a8
diff --git a/grub-core/gfxmenu/gui_list.c b/grub-core/gfxmenu/gui_list.c
b71686
index 01477cdf2..df334a6c5 100644
9723a8
--- a/grub-core/gfxmenu/gui_list.c
9723a8
+++ b/grub-core/gfxmenu/gui_list.c
9723a8
@@ -771,7 +771,7 @@ list_set_property (void *vself, const char *name, const char *value)
9723a8
         {
9723a8
           self->need_to_recreate_boxes = 1;
9723a8
           grub_free (self->selected_item_box_pattern);
9723a8
-          self->selected_item_box_pattern = value ? grub_strdup (value) : 0;
9723a8
+          self->selected_item_box_pattern = grub_strdup (value);
9723a8
           self->selected_item_box_pattern_inherit = 0;
9723a8
         }
9723a8
     }