Re: [PATCH 2/3] stripspace: Implement --count-lines option

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

 



On 2015-10-16 at 19:35:49 +0200, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Tobias Klauser <tklauser@xxxxxxxxxx> writes:
> 
> >> So this is your output code, which gives only the number of lines
> >> without the cleaned up result.
> >
> > This should better be a simple printf("%zu\n", lines) I guess?
> 
> I think we actively avoid using %z conversion that is only C99.
> 
> If you really want to, you could count in size_t and use %lu with
> appropriate casting, which I think is what we do in the rest of the
> codebase.
> 
> For this one, I think it is sufficient to just count in int and
> print as int with %d, though.

Ok, will use an int to count and printf("%d\n").
--
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]