fs/{cbfs,cpio}: Remove useless check if mode is NULL.
Callers already ensure that it's not null. Found by: Coverity Scan.
This commit is contained in:
parent
4192f2e3d1
commit
69a52e95d4
2 changed files with 2 additions and 4 deletions
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue