summaryrefslogtreecommitdiff
path: root/stagit.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2016-05-07 14:34:26 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2016-05-07 14:34:51 +0200
commitf89c317dee3006e0c7b88832d7c74e30f646036c (patch)
treef80286fb8eca6a29fd212fb01f065cb47a4f13b4 /stagit.c
parentf8e30cf2a0398120bca874bafe170857426a1780 (diff)
simplify, no need for goto
Diffstat (limited to 'stagit.c')
-rw-r--r--stagit.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/stagit.c b/stagit.c
index 4048873..6a79573 100644
--- a/stagit.c
+++ b/stagit.c
@@ -866,12 +866,10 @@ writefiles(FILE *fp, const git_oid *id, const char *branch)
"<td>Mode</td><td>Name</td><td class=\"num\">Size</td>"
"</tr>\n</thead><tbody>\n", fp);
- if (git_commit_lookup(&commit, repo, id) ||
- git_commit_tree(&tree, commit))
- goto err;
- ret = writefilestree(fp, tree, branch, "");
+ if (!git_commit_lookup(&commit, repo, id) &&
+ !git_commit_tree(&tree, commit))
+ ret = writefilestree(fp, tree, branch, "");
-err:
fputs("</tbody></table>", fp);
git_commit_free(commit);