shared/btrfs-util: simplify return conditions

Coverity has trouble undertanding this function, so let's get rid of the
redundant return branch to simplify the code.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2024-05-21 09:08:48 +02:00
parent cbd8fc859a
commit ab0137b44a

View file

@ -1637,13 +1637,10 @@ int btrfs_qgroup_find_parents(int fd, uint64_t qgroupid, uint64_t **ret) {
break;
}
if (n_items <= 0) {
*ret = NULL;
return 0;
}
assert((n_items > 0) == !!items);
assert(n_items <= INT_MAX);
*ret = TAKE_PTR(items);
return (int) n_items;
}