[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 12/21/2010 04:41 PM, Zdenek Kabelac wrote:

> -	*desc = dm_pool_strdup(mem, d);
> +	*desc = (d) ? dm_pool_strdup(mem, d) : NULL;

dm_pool_strdup(NULL) tries to alloc 1 byte and returning pointer, 
and not setting to \0 and calling strlen(NULL).

dunno what was the intention here.

> -	get_config_uint32(cft->root, "creation_time", &u);
> +	(void) get_config_uint32(cft->root, "creation_time", &u);

What's wrong here? I thought that this is needed only
if is defined with warn_if_unused_result?

Milan


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