Re: [PATCH] contrib/git-credential-gnome-keyring.c: small stylistic cleanups

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

 



John Szakmeister <john@xxxxxxxxxxxxxxx> writes:

> On Mon, Dec 9, 2013 at 1:06 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> [snip]
>>
>> I thought we cast without SP after the (typename), i.e.
>>
>>         gpointer *data = (gpointer *)user_data;
>
> I've found a mixture of both in the code base, and the
> CodingGuidelines doesn't say either way.  I'm happy to switch the file
> to no SP after the typename if that's the project preference.

Somewhat arbitrary and unscientific, but between

    git grep -e '[^f]([a-z_ ]* \*)[^ ]' -- \*.c | wc -l
    422
    $ git grep -e '[^f]([a-z_ ]* \*) ' -- \*.c | wc -l
    233

I see that we favor "(struct blah *)apointer" over "(int *)
apointer".  Many hits in the latter grep come from compat/
that are borrowed pieces of code we tend not to style-fix.

The leading [^f] is crudely excludes "sizeof(typename *)"; it does
not change the resulting picture in a major way, though.

Thanks.
--
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]