Re: [PATCH v3 07/12] config.c: pass ctx with CLI config

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

 



"Glen Choo via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
> @@ -2465,16 +2488,10 @@ static int configset_add_value(struct config_reader *reader,
>  	l_item->e = e;
>  	l_item->value_index = e->value_list.nr - 1;
>  
> -	if (!reader->source)
> -		BUG("configset_add_value has no source");
>  	if (reader->source->name) {
> -		kvi_from_source(reader->source, current_config_scope(), kv_info);
> +		kvi_from_source(reader->source, kvi_p->scope, kv_info);
>  	} else {
> -		/* for values read from `git_config_from_parameters()` */
> -		kv_info->filename = NULL;
> -		kv_info->linenr = -1;
> -		kv_info->origin_type = CONFIG_ORIGIN_CMDLINE;
> -		kv_info->scope = reader->parsing_scope;
> +		kvi_from_param(kv_info);
>  	}
>  	si->util = kv_info;
>  

Any reason to remove the "if (!reader->source)" guard? I don't think
this patch does anything to ensure that reader is present. We can
probably remove this once "reader" is removed.

The rest of the patch looks fine (and all patches prior look fine too.
 



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux