Re: [PATCH v2 01/11] reftable: consistently refer to `reftable_write_options` as `opts`

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

>  int reftable_new_stack(struct reftable_stack **dest, const char *dir,
> -		       struct reftable_write_options config);
> +		       struct reftable_write_options opts);

Passing struct by value is somewhat unusual.  As long as the
structure does not contain any pointer to something else, it is not
too bad as structure assignment would also work well, though.  Not a
fault of this patch, and this series is not a place to change
anything about it.

> -	if (config.hash_id == 0) {
> -		config.hash_id = GIT_SHA1_FORMAT_ID;
> -	}
> +	if (opts.hash_id == 0)
> +		opts.hash_id = GIT_SHA1_FORMAT_ID;

Nice attention to detail.





[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