Re: [PATCH] Make git-mailinfo strip whitespace from the start of the mail file.

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

 



Simon Sasburg <simon.sasburg@xxxxxxxxx> writes:

> @@ -935,6 +936,11 @@ static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
>  	p_hdr_data = xcalloc(MAX_HDR_PARSED, sizeof(char *));
>  	s_hdr_data = xcalloc(MAX_HDR_PARSED, sizeof(char *));
>  
> +	do {
> +		peek = fgetc(in);
> +	} while (peek == ' ' || peek == '\r' || peek == '\n');
> +	ungetc(peek, in);
> +

I wonder why this is not using isspace(peek).
-
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]

  Powered by Linux