writeblobhtml: minor style fix - stagit-gopher - A git gopher frontend. (mirror)
HTML git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 8e4eb29210cfefd01ce797e1818df86b3fe2dce6
DIR parent 394d90b7bb878b54173a08bfe31402ddd29a2a54
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 17 Apr 2017 16:16:33 +0200
writeblobhtml: minor style fix
using len instead of the loop 'i' is slightly more clear
Diffstat:
M stagit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git 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);