commit - 2f26d3340d5e3957488707d3098e6ec7a417b67a
commit + e2af4cd74c227f8f647bcb29631fd0cfa70d6358
blob - d957f57cb96bdd3843b1e17a19ad3b6b3961e921
blob + 3d131e88f1769fb82e6fbf1a43fb8f7cb2e0a452
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
static const struct got_error *
got_gotweb_openfile(FILE **f, int *priv_fd, int *fd)
{
- const struct got_error *error = NULL;
-
*fd = dup(*priv_fd);
if (*fd < 0)
*f = fdopen(*fd, "w+");
if (*f == NULL) {
close(*fd);
- error = got_error(GOT_ERR_PRIVSEP_NO_FD);
+ return got_error(GOT_ERR_PRIVSEP_NO_FD);
}
- return error;
+ return NULL;
}
static const struct got_error *
got_gotweb_dupfd(int *priv_fd, int *fd)
{
- const struct got_error *error = NULL;
-
*fd = dup(*priv_fd);
if (*fd < 0)
return NULL;
- return error;
+ return NULL;
}
const struct got_error *
got_get_repo_owner(char **owner, struct request *c, char *dir)
{
- const struct got_error *error = NULL;
struct server *srv = c->srv;
struct transport *t = c->t;
struct got_repository *repo = t->repo;
if (*owner == NULL)
return got_error_from_errno("strdup");
}
- return error;
+ return NULL;
}
const struct got_error *
static const struct got_error *
got_init_repo_commit(struct repo_commit **rc)
{
- const struct got_error *error = NULL;
-
*rc = calloc(1, sizeof(**rc));
if (*rc == NULL)
return got_error_from_errno2("%s: calloc", __func__);
(*rc)->tree_id = NULL;
(*rc)->commit_msg = NULL;
- return error;
+ return NULL;
}
static const struct got_error *
got_init_repo_tag(struct repo_tag **rt)
{
- const struct got_error *error = NULL;
-
*rt = calloc(1, sizeof(**rt));
if (*rt == NULL)
return got_error_from_errno2("%s: calloc", __func__);
(*rt)->commit_msg = NULL;
(*rt)->tagger = NULL;
- return error;
+ return NULL;
}