]> gitweb.ps.run Git - ps-cgit/commitdiff
ui-log: fix double counting
authorJohn Keeping <john@keeping.me.uk>
Wed, 12 Aug 2015 15:41:34 +0000 (16:41 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 12 Aug 2015 15:43:08 +0000 (17:43 +0200)
This crept in while rebasing the previous commit onto an updated
upstream.

Signed-off-by: John Keeping <john@keeping.me.uk>
ui-log.c

index ff832cee9adcaf9519cfcda5cff2748ae9ba6b3a..6bff94807886c39e5e15ec58e66f67a81b50187b 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -476,7 +476,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
        if (ofs<0)
                ofs = 0;
 
-       for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; i++) {
+       for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; /* nop */) {
                if (show_commit(commit, &rev))
                        i++;
                free_commit_buffer(commit);
@@ -484,7 +484,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
                commit->parents = NULL;
        }
 
-       for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; i++) {
+       for (i = 0; i < cnt && (commit = get_revision(&rev)) != NULL; /* nop */) {
                /*
                 * In "follow" mode, we must count the files and lines the
                 * first time we invoke diff on a given commit, and we need