diff --git a/grub-core/fs/cbfs.c b/grub-core/fs/cbfs.c index 4ddd6832f..a34eb88cb 100644 --- a/grub-core/fs/cbfs.c +++ b/grub-core/fs/cbfs.c @@ -74,8 +74,7 @@ grub_cbfs_find_file (struct grub_archelp_data *data, char **name, (void) mtime; offset = grub_be_to_cpu32 (hd.offset); - if (mode) - *mode = GRUB_ARCHELP_ATTR_FILE | GRUB_ARCHELP_ATTR_NOTIME; + *mode = GRUB_ARCHELP_ATTR_FILE | GRUB_ARCHELP_ATTR_NOTIME; namesize = offset; if (namesize >= sizeof (hd)) diff --git a/grub-core/fs/cpio_common.c b/grub-core/fs/cpio_common.c index 20230a741..50fea47d1 100644 --- a/grub-core/fs/cpio_common.c +++ b/grub-core/fs/cpio_common.c @@ -69,8 +69,7 @@ grub_cpio_find_file (struct grub_archelp_data *data, char **name, return GRUB_ERR_NONE; } - if (mode) - *mode = modeval; + *mode = modeval; *name = grub_malloc (namesize + 1); if (*name == NULL)