Subject: Re: [PATCH v6 05/11] trailer: parse trailers from stdin

From: Junio C Hamano <[email-masked]>
Date: Wed, 05 Mar 2014 14:56:21 -0800

Christian Couder <[email-masked]> writes:

> diff --git a/trailer.c b/trailer.c
> index 5d69c00..e0e066f 100644
> --- a/trailer.c
> +++ b/trailer.c
> @@ -50,6 +50,13 @@ static size_t alnum_len(const char *buf, size_t len)
>  	return len;
>  }
>  
> +static inline int contains_only_spaces(const char *str)
> +{
> +	const char *s;
> +	for (s = str; *s && isspace(*s); s++);

Have an empty statement on a separate line for readability.  I.e.

	for (...)
        	; /* keep skipping */

> @@ -471,3 +478,72 @@ static struct trailer_item *process_command_line_args(int argc, const char **arg
> ...
> +static void process_stdin(struct trailer_item **in_tok_first,
> +			  struct trailer_item **in_tok_last)
> +{
> ...
> +	/* Print non trailer lines as is */
> +	for (i = 0; lines[i] && i < start; i++) {
> +		printf("%s", lines[i]->buf);
> +	}

Needless brace pair.