diff options
-rw-r--r-- | fcgi.c | 4 | ||||
-rw-r--r-- | ge.c | 14 | ||||
-rw-r--r-- | parse.y | 4 | ||||
-rw-r--r-- | sandbox.c | 2 |
4 files changed, 12 insertions, 12 deletions
@@ -244,14 +244,14 @@ fcgi_read(struct bufferevent *bev, void *d) struct sockaddr_un addr; if ((debug_socket = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) - err(1, "socket"); + fatal("socket"); memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strlcpy(addr.sun_path, "./debug.sock", sizeof(addr.sun_path)); if (connect(debug_socket, (struct sockaddr*)&addr, sizeof(addr)) == -1) - err(1, "connect"); + fatal("connect"); } #endif @@ -56,9 +56,9 @@ load_local_cert(struct vhost *h, const char *hostname, const char *dir) char *cert, *key; if (asprintf(&cert, "%s/%s.cert.pem", dir, hostname) == -1) - errx(1, "asprintf"); + fatal("asprintf"); if (asprintf(&key, "%s/%s.key.pem", dir, hostname) == -1) - errx(1, "asprintf"); + fatal("asprintf"); if (access(cert, R_OK) == -1 || access(key, R_OK) == -1) gen_certificate(hostname, cert, key); @@ -102,12 +102,12 @@ data_dir(void) if ((xdg = getenv("XDG_DATA_HOME")) == NULL) { if ((home = getenv("HOME")) == NULL) - errx(1, "XDG_DATA_HOME and HOME both empty"); + fatalx("XDG_DATA_HOME and HOME both empty"); if (asprintf(&t, "%s/.local/share/gmid", home) == -1) - err(1, "asprintf"); + fatalx("asprintf"); } else { if (asprintf(&t, "%s/gmid", xdg) == -1) - err(1, "asprintf"); + fatal("asprintf"); } mkdirs(t, 0755); @@ -120,11 +120,11 @@ logger_init(void) int p[2]; if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, p) == -1) - err(1, "socketpair"); + fatal("socketpair"); switch (fork()) { case -1: - err(1, "fork"); + fatal("fork"); case 0: close(p[0]); setproctitle("logger"); @@ -675,7 +675,7 @@ lungetc(int c) if (file->ungetpos >= file->ungetsize) { void *p = reallocarray(file->ungetbuf, file->ungetsize, 2); if (p == NULL) - err(1, "lungetc"); + fatal("lungetc"); file->ungetbuf = p; file->ungetsize *= 2; } @@ -809,7 +809,7 @@ top: } yylval.v.string = strdup(buf); if (yylval.v.string == NULL) - err(1, "yylex: strdup"); + fatal("yylex: strdup"); return STRING; } @@ -47,7 +47,7 @@ void sandbox_logger_process(void) { if (pledge("stdio recvfd", NULL) == -1) - err(1, "pledge"); + fatal("pledge"); } #else |