commit - 6b42af1e1d379806c1ef2cccfa084a7b8de605f1
commit + 3179741908f46f3c1711b053ad2ab839c746a5bf
blob - 666bccbe101c17a74289291ee61102b8a25c7017
blob + 0e595b8cf284b38d7e38818d5b0098211ae9e414
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
return got_error_from_errno("asprintf");
if (asprintf(&repo_path, "%s/%s", srv->repos_path,
- repo_dir->name) == -1)
- return got_error_from_errno("asprintf");
+ repo_dir->name) == -1) {
+ error = got_error_from_errno("asprintf");
+ goto done;
+ }
error = got_init_repo_commit(&repo_commit);
if (error)
- return error;
+ goto done;
/*
* XXX: jumping directly to a commit id via
blob - d53434630171a876941517eff6fb77fb26a15bea
blob + a2dac356c51f861fae48abc66f39d4227b784edb
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
f = fopen(d_file, "r");
if (f == NULL) {
- if (errno == ENOENT || errno == EACCES)
- return NULL;
- error = got_error_from_errno2("fopen", d_file);
+ if (errno != ENOENT && errno != EACCES)
+ error = got_error_from_errno2("fopen", d_file);
goto done;
}
if (len == 0) {
*description = strdup("");
if (*description == NULL)
- return got_error_from_errno("strdup");
+ error = got_error_from_errno("strdup");
goto done;
}