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

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

 



Christian Couder <chriscool@xxxxxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]