simplify, no need for goto
1 files changed, 3 insertions(+), 5 deletions(-) | |||
---|---|---|---|
M | stagit.c | +3 | -5 |
1@@ -866,12 +866,10 @@ writefiles(FILE *fp, const git_oid *id, const char *branch)
2 "<td>Mode</td><td>Name</td><td class=\"num\">Size</td>"
3 "</tr>\n</thead><tbody>\n", fp);
4
5- if (git_commit_lookup(&commit, repo, id) ||
6- git_commit_tree(&tree, commit))
7- goto err;
8- ret = writefilestree(fp, tree, branch, "");
9+ if (!git_commit_lookup(&commit, repo, id) &&
10+ !git_commit_tree(&tree, commit))
11+ ret = writefilestree(fp, tree, branch, "");
12
13-err:
14 fputs("</tbody></table>", fp);
15
16 git_commit_free(commit);