mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
coverity: check for dm_snprintf
Check return state like everywhere else.
This commit is contained in:
parent
a9634e993a
commit
9e3a9eab0e
@ -1446,7 +1446,8 @@ static int _do_get_kernel_cache_settings_list(struct dm_pool *mem,
|
|||||||
buf_len = strlen(key) + strlen(value) + 2;
|
buf_len = strlen(key) + strlen(value) + 2;
|
||||||
if (!(buf = dm_pool_alloc(mem, buf_len)))
|
if (!(buf = dm_pool_alloc(mem, buf_len)))
|
||||||
return_0;
|
return_0;
|
||||||
dm_snprintf(buf, buf_len, "%s=%s", key, value);
|
if (dm_snprintf(buf, buf_len, "%s=%s", key, value) < 0)
|
||||||
|
return_0;
|
||||||
if (!str_list_add_no_dup_check(mem, result, buf))
|
if (!str_list_add_no_dup_check(mem, result, buf))
|
||||||
return_0;
|
return_0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user