commit - 68368f4c29e208c67724b04fd0142e233a247a2a
commit + 792f302acee3122ed0f9469d8676dbb271f60849
blob - a9616eb98d9527801527555652f4669f7346f1c9
blob + ffc37990b43dc22f237036173b175d23809e64aa
--- gmid.c
+++ gmid.c
ec = asprintf(&fmted, "%s:%s GET %s %.*s", hbuf, sbuf, b,
(int)(t-meta), meta);
if (ec == -1)
- err(1, "asprintf");
+ fatal("asprintf");
proc_compose(conf->ps, PROC_LOGGER, IMSG_LOG_REQUEST,
fmted, ec + 1);
conf = config_new();
if (parse_conf(conf, config_path) == -1)
- errx(1, "failed to load configuration file");
+ fatalx("failed to load configuration file");
if (*conf->chroot != '\0' && *conf->user == '\0')
fatalx("can't chroot without a user to switch to after.");
blob - 11d4250da12f95f67ac51634d203258c9c172c5d
blob + ecbb7281a15eeca6a4397ebb93fd161b2a0a2d2c
--- parse.y
+++ parse.y
| TCP string PORT NUM {
char *c;
if (asprintf(&c, "%d", $4) == -1)
- err(1, "asprintf");
+ fatal("asprintf");
loc->fcgi = fastcgi_conf($2, c);
free($2);
}
medianamesl : numberstring {
if (add_mime(&conf->mime, current_media, $1) == -1)
- err(1, "add_mime");
+ fatal("add_mime");
free($1);
}
;
blob - 9aac9dfbb42216fc0f8b8db86ffc8ca5353d8187
blob + b8f09c78a7371abd6765f332139af72ee4e58c67
--- utils.c
+++ utils.c
if (*path == '/') {
if ((r = strdup(path)) == NULL)
- err(1, "strdup");
+ fatal("strdup");
return r;
}
wd = getcwd(NULL, 0);
if (asprintf(&r, "%s/%s", wd, path) == -1)
- err(1, "asprintf");
+ fatal("asprintf");
free(wd);
return r;
}
char *d;
if ((d = strdup(s)) == NULL)
- err(1, "strdup");
+ fatal("strdup");
return d;
}
void *d;
if ((d = calloc(nmemb, size)) == NULL)
- err(1, "calloc");
+ fatal("calloc");
return d;
}