diff options
author | Omar Polo <op@omarpolo.com> | 2021-07-07 09:46:37 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-07-07 09:46:37 +0000 |
commit | a8a1f439210de9538b196c6bb5470c306379128c (patch) | |
tree | 53c25939117755a85860dab8670cc7faaad56635 | |
parent | 68ef1170922d8c457b529dd7f64dc207a3c8b5a3 (diff) |
style(9)-ify
-rw-r--r-- | gmid.c | 6 | ||||
-rw-r--r-- | gmid.h | 6 | ||||
-rw-r--r-- | iri.c | 12 | ||||
-rw-r--r-- | sandbox.c | 18 | ||||
-rw-r--r-- | server.c | 12 | ||||
-rw-r--r-- | utf8.c | 3 |
6 files changed, 38 insertions, 19 deletions
@@ -657,9 +657,11 @@ main(int argc, char **argv) pidfd = write_pidfile(pidfile); - /* Linux seems to call the event handlers even when we're + /* + * Linux seems to call the event handlers even when we're * doing a sigwait. These dummy handlers are here to avoid - * being terminated on SIGHUP, SIGINT or SIGTERM. */ + * being terminated on SIGHUP, SIGINT or SIGTERM. + */ signal(SIGHUP, dummy_handler); signal(SIGINT, dummy_handler); signal(SIGTERM, dummy_handler); @@ -123,9 +123,11 @@ struct vhost { TAILQ_ENTRY(vhost) vhosts; - /* the first location rule is always '*' and holds the default + /* + * the first location rule is always '*' and holds the default * settings for the vhost, then follows the "real" location - * rules as specified in the configuration. */ + * rules as specified in the configuration. + */ struct lochead locations; struct envhead env; @@ -114,13 +114,15 @@ parse_scheme(struct parser *p) } do { - /* normalize the scheme (i.e. lowercase it) + /* + * normalize the scheme (i.e. lowercase it) * * XXX: since we cannot have good things, tolower * behaviour depends on the LC_CTYPE locale. The good * news is that we're sure p->iri points to something * that's in the ASCII range, so tolower can't - * mis-behave on some systems due to the locale. */ + * mis-behave on some systems due to the locale. + */ *p->iri = tolower(*p->iri); p->iri++; } while (isalnum(*p->iri) @@ -214,9 +216,11 @@ parse_authority(struct parser *p) return 0; } -/* Routine for path_clean. Elide the pointed .. with the preceding +/* + * Routine for path_clean. Elide the pointed .. with the preceding * element. Return 0 if it's not possible. incr is the length of - * the increment, 3 for ../ and 2 for .. */ + * the increment, 3 for ../ and 2 for .. + */ static int path_elide_dotdot(char *path, char *i, int incr) { @@ -53,8 +53,10 @@ sandbox_server_process(void) void sandbox_executor_process(void) { - /* We cannot capsicum the executor process because it needs - * to fork(2)+execve(2) cgi scripts */ + /* + * We cannot capsicum the executor process because it needs to + * fork(2)+execve(2) cgi scripts + */ return; } @@ -435,18 +437,22 @@ sandbox_server_process(void) void sandbox_executor_process(void) { - /* We cannot use seccomp for the executor process because we + /* + * We cannot use seccomp for the executor process because we * don't know what the child will do. Also, our filter will * be inherited so the child cannot set its own seccomp - * policy. */ + * policy. + */ return; } void sandbox_logger_process(void) { - /* To be honest, here we could use a seccomp policy to only - * allow writev(2) and memory allocations. */ + /* + * To be honest, here we could use a seccomp policy to only + * allow writev(2) and memory allocations. + */ return; } @@ -930,10 +930,12 @@ enter_handle_dirlist(int fd, short ev, void *d) l = snprintf(c->sbuf, sizeof(c->sbuf), "# Index of %s\n\n", b); if (l >= sizeof(c->sbuf)) { - /* this is impossible, given that we have enough space + /* + * This is impossible, given that we have enough space * in c->sbuf to hold the ancilliary string plus the * full path; but it wouldn't read nice without some - * error checking, and I'd like to avoid a strlen. */ + * error checking, and I'd like to avoid a strlen. + */ close_conn(fd, ev, c); return; } @@ -1253,8 +1255,10 @@ handle_imsg_quit(struct imsgbuf *ibuf, struct imsg *imsg, size_t len) (void)imsg; (void)len; - /* don't call event_loopbreak since we want to finish to - * handle the ongoing connections. */ + /* + * don't call event_loopbreak since we want to finish to + * handle the ongoing connections. + */ shutting_down = 1; @@ -1,4 +1,5 @@ -/* Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de> +/* + * Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation |