simplify, no need for goto - stagit-gopher - A git gopher frontend. (mirror) | |
git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2h… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit f89c317dee3006e0c7b88832d7c74e30f646036c | |
parent f8e30cf2a0398120bca874bafe170857426a1780 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Sat, 7 May 2016 14:34:26 +0200 | |
simplify, no need for goto | |
Diffstat: | |
M stagit.c | 8 +++----- | |
1 file changed, 3 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/stagit.c b/stagit.c | |
@@ -866,12 +866,10 @@ writefiles(FILE *fp, const git_oid *id, const char *branc… | |
"<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); |