commit - 1999985f9a161118336b49101e3aab94bced7722
commit + dd84f50528e78a6c691c9979129f2ee6564bee96
blob - 341cf75d34498e24ad33414f270b7cb0234960e0
blob + 18c5d080235f613812163295cc01d3632e584e0a
--- 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;
}