From f2f4903de4bd3ce06c03dd66f0c9a7dda97a3550 Mon Sep 17 00:00:00 2001 From: NRK Date: Fri, 10 Feb 2023 11:35:53 +0600 Subject: apply clang-format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit minus the bogus changes Co-authored-by: Berke Kocaoğlu --- autoreload.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'autoreload.c') diff --git a/autoreload.c b/autoreload.c index 1c2fbf7..8b3f6da 100644 --- a/autoreload.c +++ b/autoreload.c @@ -28,7 +28,10 @@ #include #include -static struct { char *buf; size_t len; } scratch; +static struct { + char *buf; + size_t len; +} scratch; void arl_init(arl_t *arl) { @@ -94,7 +97,10 @@ bool arl_handle(arl_t *arl) char *ptr; const struct inotify_event *e; /* inotify_event aligned buffer */ - static union { char d[4096]; struct inotify_event e; } buf; + static union { + char d[4096]; + struct inotify_event e; + } buf; while (true) { ssize_t len = read(arl->fd, buf.d, sizeof(buf.d)); @@ -105,7 +111,7 @@ bool arl_handle(arl_t *arl) break; } for (ptr = buf.d; ptr < buf.d + len; ptr += sizeof(*e) + e->len) { - e = (const struct inotify_event*) ptr; + e = (const struct inotify_event *)ptr; if (e->wd == arl->wd_file && (e->mask & IN_CLOSE_WRITE)) { reload = true; } else if (e->wd == arl->wd_file && (e->mask & IN_DELETE_SELF)) { @@ -128,18 +134,18 @@ void arl_init(arl_t *arl) void arl_cleanup(arl_t *arl) { - (void) arl; + (void)arl; } void arl_add(arl_t *arl, const char *filepath) { - (void) arl; - (void) filepath; + (void)arl; + (void)filepath; } bool arl_handle(arl_t *arl) { - (void) arl; + (void)arl; return false; } -- cgit v1.2.3-54-g00ecf