Pārlūkot izejas kodu

Clean up assertion in get_boot_devices_list()

g_strdup() can't fail, remove assertion.  Assert its argument can't be
null, because that's not obvious (add_boot_device_path() ensures it).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster 13 gadi atpakaļ
vecāks
revīzija
1bf6ccd372
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      vl.c

+ 1 - 1
vl.c

@@ -915,8 +915,8 @@ char *get_boot_devices_list(uint32_t *size)
         } else if (devpath) {
             bootpath = devpath;
         } else {
+            assert(i->suffix);
             bootpath = g_strdup(i->suffix);
-            assert(bootpath);
         }
 
         if (total) {