commit - 1a0f5bbdea655a0229af59d381238334409b1084
commit + 795c10a4b44673e73eb928d101e9399f826b4580
blob - de469c2ce80df6348dad32f9897849d37e202c29
blob + 0708437625bb4bf11ff867557905167c4d30d0c7
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
char *href_briefs = NULL, *href_commits = NULL, *href_tree = NULL;
char *href_tags = NULL;
unsigned int prev_disp = 0, next_disp = 1, dir_c = 0;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
if (pledge("stdio rpath proc exec sendfd unveil",
NULL) == -1) {
struct gw_header *header = NULL;
char *tree = NULL, *tree_html = NULL, *tree_html_disp = NULL;
char *age = NULL;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
if (pledge("stdio rpath proc exec sendfd unveil", NULL) == -1)
return got_error_from_errno("pledge");
{
const struct got_error *error = NULL;
struct gw_header *header = NULL;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
if (pledge("stdio rpath proc exec sendfd unveil", NULL) == -1)
return got_error_from_errno("pledge");
static const struct got_error *
gw_display_open(struct gw_trans *gw_trans, enum khttp code, enum kmime mime)
{
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
kerr = khttp_head(gw_trans->gw_req, kresps[KRESP_ALLOW], "GET");
if (kerr != KCGI_OK)
gw_display_index(struct gw_trans *gw_trans)
{
const struct got_error *error;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
/* catch early querystring errors */
if (gw_trans->error)
static const struct got_error *
gw_error(struct gw_trans *gw_trans)
{
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
kerr = khtml_puts(gw_trans->gw_html_req, gw_trans->error->msg);
gw_template(size_t key, void *arg)
{
const struct got_error *error = NULL;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
struct gw_trans *gw_trans = arg;
char *img_src = NULL;
gw_gen_author_header(struct gw_trans *gw_trans, const char *str)
{
const struct got_error *error = NULL;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "header_author_title", KATTR__MAX);
gw_gen_committer_header(struct gw_trans *gw_trans, const char *str)
{
const struct got_error *error = NULL;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "header_committer_title", KATTR__MAX);
gw_gen_commit_msg_header(struct gw_trans *gw_trans, char *str)
{
const struct got_error *error = NULL;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "header_commit_msg_title", KATTR__MAX);
gw_gen_tree_header(struct gw_trans *gw_trans, char *str)
{
const struct got_error *error = NULL;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
KATTR_ID, "header_tree_title", KATTR__MAX);
struct gw_dir *dir = NULL, *tdir;
const char *page = "index";
int gw_malloc = 1;
- enum kcgi_err kerr;
+ enum kcgi_err kerr = KCGI_OK;
if ((gw_trans = malloc(sizeof(struct gw_trans))) == NULL)
errx(1, "malloc");