Re: [PATCH] Speed up commands that use rev-list when max-count is specified.

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

 



On Sat, Mar 20, 2010 at 11:31 PM, Benjamin C Meyer <bmeyer@xxxxxxx> wrote:
>  struct commit *get_revision(struct rev_info *revs)
>  {
> +       if (revs->max_count == 0)
> +               return NULL;
> +
>        struct commit *c;
>        struct commit_list *reversed;

Declaring variables in the middle of a function is a C99 feature (and
a GNU extension in C89 mode).  I don't know if this is allowed in git
code, but it would be easy enough to make this ANSI C89 compatible by
putting your new statement after the variable declarations.
--
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]