The path local variable in grub_core_cmd_ls() is assigned values such that it cannot be NULL, so a couple of if blocks can be removed as they are never executed.
2013-05-12 Francesco Lavra <francescolavra...@gmail.com> * grub-core/kern/corecmd.c (grub_core_cmd_ls): Remove unreachable code. === modified file 'grub-core/kern/corecmd.c' --- grub-core/kern/corecmd.c 2013-03-03 00:34:27 +0000 +++ grub-core/kern/corecmd.c 2013-05-12 09:36:16 +0000 @@ -139,21 +139,7 @@ else path++; - if (! path && ! device_name) - { - grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument"); - goto fail; - } - - if (! path) - { - if (grub_errno == GRUB_ERR_UNKNOWN_FS) - grub_errno = GRUB_ERR_NONE; - - grub_printf ("(%s): Filesystem is %s.\n", - device_name, fs ? fs->name : "unknown"); - } - else if (fs) + if (fs) { (fs->dir) (dev, path, grub_mini_print_files, NULL); grub_xputs ("\n"); _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel