]> git.armaanb.net Git - stagit.git/commitdiff
writeblobhtml: minor style fix
authorHiltjo Posthuma <hiltjo@codemadness.org>
Mon, 17 Apr 2017 14:16:33 +0000 (16:16 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Mon, 17 Apr 2017 14:16:33 +0000 (16:16 +0200)
using len instead of the loop 'i' is slightly more clear

stagit.c

index ca70214706f6cf1c65da3900154da07a222898cb..23901c8937d15e672de8cda8efe18cb9148d623c 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -395,7 +395,7 @@ writeblobhtml(FILE *fp, const git_blob *blob)
                        prev = i + 1;
                }
                /* trailing data */
-               if ((i - prev) > 0) {
+               if ((len - prev) > 0) {
                        n++;
                        fprintf(fp, nfmt, n, n, n);
                        xmlencode(fp, &s[prev], len - prev);