[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 15/23] Add test check for find_config_str



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]