Re: [PATCH 2/5] sequencer: start removing private fields from public API

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

 



Phillip Wood <phillip.wood123@xxxxxxxxx> writes:

> +/*
> + * A 'struct replay_ctx' represents the private state of the sequencer.
> + */
> +struct replay_ctx {
> +	/*
> +	 * Stores the reflog message that will be used when creating a
> +	 * commit. Points to a static buffer and should not be free()'d.
> +	 */
> +	const char *reflog_message;
> +};
> +
> +struct replay_ctx* replay_ctx_new(void)

Style.

Also if you intend to make the structure opaque and private,
shouldn't you make this static to make it truly internal?  The
initializer of the containing replay_opts structure would be the
only thing that needs to know how to instantiate it, no?  Or does a
replay_ctx has reason to exist outside the context of an instance of
replay_opts?

i.e.

	static struct replay_ctx *replay_ctx_new(void)

The remainder seem mechanical so I'll skip them.




[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