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

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