mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
report: Fix warning in _str_list_append.
../../lib/report/report.c: In function ‘_str_list_append’: ../../lib/report/report.c:256: warning: declaration of ‘dup’ shadows a global declaration
This commit is contained in:
parent
87e80b6aac
commit
404c834e14
@ -253,11 +253,14 @@ struct _str_list_append_baton {
|
||||
static int _str_list_append(const char *line, void *baton)
|
||||
{
|
||||
struct _str_list_append_baton *b = baton;
|
||||
const char *dup = dm_pool_strdup(b->mem, line);
|
||||
if (!dup)
|
||||
const char *line2 = dm_pool_strdup(b->mem, line);
|
||||
|
||||
if (!line2)
|
||||
return_0;
|
||||
if (!str_list_add(b->mem, b->result, dup))
|
||||
|
||||
if (!str_list_add(b->mem, b->result, line2))
|
||||
return_0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user