mirror of
https://github.com/systemd/systemd
synced 2024-10-15 12:34:37 +00:00
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:
parent
cbd8fc859a
commit
ab0137b44a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue