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

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