mirror of
git://sourceware.org/git/lvm2.git
synced 2025-09-09 17:44:26 +03:00
coverity: add some tests for function results
Even though they cannot normally happen...
This commit is contained in:
@@ -861,7 +861,7 @@ static int remove_metadata(lvmetad_state *s, const char *vgid, int update_pvids)
|
||||
|
||||
/* update_pvid_to_vgid will clear/free the pvid_to_vgid hash */
|
||||
if (update_pvids && meta_lookup)
|
||||
_update_pvid_to_vgid(s, meta_lookup, "#orphan", 0);
|
||||
(void) _update_pvid_to_vgid(s, meta_lookup, "#orphan", 0);
|
||||
|
||||
/* free the unmapped data */
|
||||
|
||||
|
@@ -4641,7 +4641,8 @@ static int _check_devs_used_correspond_with_lv(struct dm_pool *mem, struct dm_li
|
||||
dev = dl->dev;
|
||||
if (!(dev->flags & DEV_ASSUMED_FOR_LV)) {
|
||||
if (!found_inconsistent) {
|
||||
dm_pool_begin_object(mem, 32);
|
||||
if (!dm_pool_begin_object(mem, 32))
|
||||
return_0;
|
||||
found_inconsistent = 1;
|
||||
} else {
|
||||
if (!dm_pool_grow_object(mem, DEV_LIST_DELIM, sizeof(DEV_LIST_DELIM) - 1))
|
||||
@@ -4674,7 +4675,8 @@ static int _check_devs_used_correspond_with_lv(struct dm_pool *mem, struct dm_li
|
||||
}
|
||||
if (!(dev->flags & DEV_USED_FOR_LV)) {
|
||||
if (!found_inconsistent) {
|
||||
dm_pool_begin_object(mem, 32);
|
||||
if (!dm_pool_begin_object(mem, 32))
|
||||
return_0;
|
||||
found_inconsistent = 1;
|
||||
} else {
|
||||
if (!dm_pool_grow_object(mem, DEV_LIST_DELIM, sizeof(DEV_LIST_DELIM) - 1))
|
||||
|
Reference in New Issue
Block a user