]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
util/getroot: delete dead code
authorAndrei Borzenkov <arvidjaar@gmail.com>
Sat, 9 Jan 2016 17:54:54 +0000 (20:54 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Sat, 9 Jan 2016 17:54:54 +0000 (20:54 +0300)
is_part cannot be non-zero at this point.

Found by: Coveruty scan.
CID: 73838

util/getroot.c

index 36f1730c082cb9ec1ba433e1619c157918a44eb3..92c0d709be0996ae4d42cf2cb730e98cbd3f1926 100644 (file)
@@ -383,9 +383,6 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
     grub_util_info ("%s starts from %" GRUB_HOST_PRIuLONG_LONG,
                    os_dev, (unsigned long long) ctx.start);
 
-    if (ctx.start == 0 && !is_part)
-      return name;
-
     grub_util_info ("opening the device %s", name);
     disk = grub_disk_open (name);
     free (name);