commit 4842c72d9f3f45478cb641e15a3272e541fb8a18 from: Omar Polo date: Mon Oct 18 10:05:55 2021 UTC fmt commit - f8bcc13822154d8558246c9f994cf43c413a5714 commit + 4842c72d9f3f45478cb641e15a3272e541fb8a18 blob - 5e2ba5770fcd420374804073b8b738615c5bddfb blob + 6fbb21b436433f1f6f6b1c13f13e989e9b45550e --- fcgi.c +++ fcgi.c @@ -135,7 +135,7 @@ prepare_header(struct fcgi_header *h, int type, size_t memset(h, 0, sizeof(*h)); h->version = FCGI_VERSION_1; - h->type = type; + h->type = type; h->req_id1 = (id >> 8); h->req_id0 = (id & 0xFF); h->content_len1 = (size >> 8); @@ -168,7 +168,7 @@ fcgi_send_param(struct bufferevent *bev, const char *n const char *value) { struct fcgi_header h; - uint32_t namlen, vallen, padlen; + uint32_t namlen, vallen, padlen; uint8_t s[8]; size_t size; char padding[8] = { 0 }; blob - fd34c2e457ab3113dbeabb4a7ef7f3c205d5da15 blob + ae292d068d98fafc10dc7b221f260588029e1fc6 --- iri.c +++ iri.c @@ -229,7 +229,7 @@ path_elide_dotdot(char *path, char *i, int incr) if (i == path) return 0; for (j = i-2; j != path && *j != '/'; j--) - /* noop */ ; + /* noop */ ; if (*j == '/') j++; i += incr; @@ -428,7 +428,7 @@ serialize_iri(struct iri *i, char *buf, size_t len) strlcpy(buf, i->schema, len); strlcat(buf, "://", len); - strlcat(buf, i->host, len); + strlcat(buf, i->host, len); strlcat(buf, "/", len); if (i->path != NULL) blob - 5391f038386f96dda8089f79be85e139c196f025 blob + 8857c4bddebee91e41395d77faa01e4bb7162a36 --- sandbox.c +++ sandbox.c @@ -29,7 +29,7 @@ sandbox_server_process(void) void sandbox_executor_process(void) { - log_notice(NULL, "Sandbox disabled! " + log_notice(NULL, "Sandbox disabled! " "Please report issues upstream instead of disabling the sandbox."); } @@ -322,7 +322,7 @@ static struct sock_filter filter[] = { #endif #ifdef __NR_ioctl /* allow ioctl on fd 1, glibc doing stuff? */ - SC_ALLOW_ARG(__NR_ioctl, 0, 1), + SC_ALLOW_ARG(__NR_ioctl, 0, 1), /* allow FIONREAD needed by libevent */ SC_ALLOW_ARG(__NR_ioctl, 1, FIONREAD), #endif @@ -645,7 +645,7 @@ sandbox_executor_process(void) } for (i = 0; i < FCGI_MAX; i++) { - f = &fcgi[i]; + f = &fcgi[i]; if (f->path != NULL) { if (unveil(f->path, "rw") == -1) fatal("unveil %s", f->path); blob - 9bd17a3b1da2ae9f1891650063a9abe289c49717 blob + 88fcc70c80863b3e541bfda8e38e619ef431af1c --- server.c +++ server.c @@ -540,7 +540,7 @@ static void fmt_sbuf(const char *fmt, struct client *c, const char *path) { size_t i; - char buf[32]; + char buf[32]; memset(buf, 0, sizeof(buf)); for (i = 0; *fmt; ++fmt) { @@ -794,7 +794,7 @@ open_dir(struct client *c) c->diroff = 0; c->off = 0; - start_reply(c, SUCCESS, "text/gemini"); + start_reply(c, SUCCESS, "text/gemini"); evbuffer_add_printf(EVBUFFER_OUTPUT(c->bev), "# Index of %s\n\n", c->iri.path); return; @@ -1093,7 +1093,7 @@ start_reply(struct client *c, int code, const char *me c->type != REQUEST_FCGI && !strcmp(meta, "text/gemini") && (lang = vhost_lang(c->host, c->iri.path)) != NULL) { - rr = evbuffer_add_printf(evb, ";lang=%s", lang); + rr = evbuffer_add_printf(evb, ";lang=%s", lang); if (rr == -1) goto err; if (r + rr > 1027) blob - acba5eb45ce0ea1d4e5e8c767280af1e1197d97a blob + 72545b2fb5c90507e54d3820e0cc433dbe3e4daa --- utf8.c +++ utf8.c @@ -65,7 +65,7 @@ valid_multibyte_utf8(struct parser *p) { uint32_t cp = 0, state = 0; - for (; *p->iri; p->iri++) + for (; *p->iri; p->iri++) if (!utf8_decode(&state, &cp, *p->iri)) break; blob - 9a67ff6db934aabd4f882442af37332ab1487393 blob + 1a9a0e02a53f92f03e9f755f7df44522c8f3479c --- utils.c +++ utils.c @@ -122,7 +122,7 @@ gen_certificate(const char *hostname, const char *cert host); if ((pkey = EVP_PKEY_new()) == NULL) - fatal("couldn't create a new private key"); + fatal("couldn't create a new private key"); if ((rsa = RSA_new()) == NULL) fatal("couldn't generate rsa"); @@ -154,7 +154,7 @@ gen_certificate(const char *hostname, const char *cert X509_set_issuer_name(x509, name); if (!X509_sign(x509, pkey, EVP_sha256())) - fatal("couldn't sign the certificate"); + fatal("couldn't sign the certificate"); if ((f = fopen(keypath, "w")) == NULL) fatal("fopen(%s): %s", keypath, strerror(errno));