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:
Vladimir Serbinenko 2015-01-27 10:30:43 +01:00
parent 4192f2e3d1
commit 69a52e95d4
2 changed files with 2 additions and 4 deletions

View file

@ -74,8 +74,7 @@ grub_cbfs_find_file (struct grub_archelp_data *data, char **name,
(void) mtime; (void) mtime;
offset = grub_be_to_cpu32 (hd.offset); 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; namesize = offset;
if (namesize >= sizeof (hd)) if (namesize >= sizeof (hd))

View file

@ -69,8 +69,7 @@ grub_cpio_find_file (struct grub_archelp_data *data, char **name,
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
} }
if (mode) *mode = modeval;
*mode = modeval;
*name = grub_malloc (namesize + 1); *name = grub_malloc (namesize + 1);
if (*name == NULL) if (*name == NULL)