mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Remove test for NULL
Since it's internal function and we always check for NULL value before call - this is safe. Just for case add nonnull attribute so analyzer might better catch error.
This commit is contained in:
parent
d2c25f02e8
commit
807a5a7b13
@ -1225,14 +1225,12 @@ unsigned dm_config_maybe_section(const char *str, unsigned len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
__attribute__((nonnull(1, 2)))
|
||||
static struct dm_config_value *_clone_config_value(struct dm_pool *mem,
|
||||
const struct dm_config_value *v)
|
||||
{
|
||||
struct dm_config_value *new_cv;
|
||||
|
||||
if (!v)
|
||||
return NULL;
|
||||
|
||||
if (!(new_cv = _create_value(mem))) {
|
||||
log_error("Failed to clone config value.");
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user