revision: trivial style fixes
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras committed
Oct 31, 2013 at 03:25 UTC
9e57ac55cecec8bd2cf94d675e4458bc68a7336f
1 file changed
+6
-8
revision.c
+6
-8
@@ -1519,7 +1519,7 @@ struct cmdline_pathspec {
1519
static void append_prune_data(struct cmdline_pathspec *prune, const char **av)
1520
{
1521
while (*av) {
1522
- ALLOC_GROW(prune->path, prune->nr+1, prune->alloc);
1522
+ ALLOC_GROW(prune->path, prune->nr + 1, prune->alloc);
1523
prune->path[prune->nr++] = *(av++);
1524
}
1525
}
@@ -1531,7 +1531,7 @@ static void read_pathspec_from_stdin(struct rev_info *revs, struct strbuf *sb,
1531
int len = sb->len;
1532
if (len && sb->buf[len - 1] == '\n')
1533
sb->buf[--len] = '\0';
1534
- ALLOC_GROW(prune->path, prune->nr+1, prune->alloc);
1534
+ ALLOC_GROW(prune->path, prune->nr + 1, prune->alloc);
1535
prune->path[prune->nr++] = xstrdup(sb->buf);
1536
}
1537
}
@@ -2134,7 +2134,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
2134
* call init_pathspec() to set revs->prune_data here.
2135
* }
2136
*/
2137
- ALLOC_GROW(prune_data.path, prune_data.nr+1, prune_data.alloc);
2137
+ ALLOC_GROW(prune_data.path, prune_data.nr + 1, prune_data.alloc);
2138
prune_data.path[prune_data.nr++] = NULL;
2139
parse_pathspec(&revs->prune_data, 0, 0,
2140
revs->prefix, prune_data.path);
@@ -2987,7 +2987,7 @@ static struct commit *get_revision_internal(struct rev_info *revs)
2987
if (revs->max_count) {
2988
c = get_revision_1(revs);
2989
if (c) {
2990
- while (0 < revs->skip_count) {
2990
+ while (revs->skip_count > 0) {
2991
revs->skip_count--;
2992
c = get_revision_1(revs);
2993
if (!c)
@@ -3002,9 +3002,8 @@ static struct commit *get_revision_internal(struct rev_info *revs)
3002
if (c)
3003
c->object.flags |= SHOWN;
3004
3005
- if (!revs->boundary) {
3005
+ if (!revs->boundary)
3006
return c;
3007
- }
3007
3008
if (!c) {
3009
/*
@@ -3050,9 +3049,8 @@ struct commit *get_revision(struct rev_info *revs)
3049
3050
if (revs->reverse) {
3051
reversed = NULL;
3053
- while ((c = get_revision_internal(revs))) {
3052
+ while ((c = get_revision_internal(revs)))
3053
commit_list_insert(c, &reversed);
3055
- }
3054
revs->commits = reversed;
3055
revs->reverse = 0;
3056
revs->reverse_output_stage = 1;