[lvm-devel] [PATCH 15/23] Add test check for find_config_str
Alasdair G Kergon
agk at redhat.com
Wed Jan 5 01:01:31 UTC 2011
On Tue, Dec 21, 2010 at 04:41:47PM +0100, Zdenek Kabelac wrote:
> It looks like there should be some error code returned from _read_desc
> when something fails.
No need - the code is just using default values of "" and 0.
> - *desc = dm_pool_strdup(mem, d);
> + *desc = (d) ? dm_pool_strdup(mem, d) : NULL;
Superfluous - this follows
d = find_config_str(cft->root, "description", "");
which returns "" on failure so d is never NULL.
Alasdair
More information about the lvm-devel
mailing list