tree-wide: simplify handling of blkid errors

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-02-21 16:41:33 -05:00
parent a3d8d68cc1
commit b382db9f3b
3 changed files with 27 additions and 63 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ static int find_gpt_root(struct udev_device *dev, blkid_probe pr, bool test) {
errno = 0;
pl = blkid_probe_get_partitions(pr);
if (!pl)
return errno > 0 ? -errno : -ENOMEM;
return -errno ?: -ENOMEM;
nvals = blkid_partlist_numof_partitions(pl);
for (i = 0; i < nvals; i++) {