simplify + style fixes
1 files changed, 6 insertions(+), 8 deletions(-) | |||
---|---|---|---|
M | urmoms.c | +6 | -8 |
1@@ -174,7 +174,7 @@ printcommit(FILE *fp, git_commit *commit)
2
3 if ((count = (int)git_commit_parentcount(commit)) > 1) {
4 fprintf(fp, "<b>Merge:</b>");
5- for (i = 0; i < count; ++i) {
6+ for (i = 0; i < count; i++) {
7 git_oid_tostr(buf, 8, git_commit_parent_id(commit, i));
8 fprintf(fp, " <a href=\"%scommit/%s.html\">%s</a>",
9 relpath, buf, buf);
10@@ -430,7 +430,7 @@ printcommitatom(FILE *fp, git_commit *commit)
11
12 if ((count = (int)git_commit_parentcount(commit)) > 1) {
13 fprintf(fp, "Merge:");
14- for (i = 0; i < count; ++i) {
15+ for (i = 0; i < count; i++) {
16 git_oid_tostr(buf, 8, git_commit_parent_id(commit, i));
17 fprintf(fp, " %s", buf);
18 }
19@@ -569,12 +569,10 @@ main(int argc, char *argv[])
20 fclose(fpread);
21 }
22
23- /* read LICENSE */
24- if (!git_revparse_single(&obj, repo, "HEAD:LICENSE"))
25- haslicense = 1;
26- /* read README */
27- if (!git_revparse_single(&obj, repo, "HEAD:README"))
28- hasreadme = 1;
29+ /* check LICENSE */
30+ haslicense = !git_revparse_single(&obj, repo, "HEAD:LICENSE");
31+ /* check README */
32+ hasreadme = !git_revparse_single(&obj, repo, "HEAD:README");
33
34 /* read LICENSE */
35 if (!git_revparse_single(&obj, repo, "HEAD:LICENSE")) {