From 81159507d35ef087dfd796c08af07c1902e270e5 Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Sun, 19 Sep 2021 14:23:51 +0200 Subject: applied clang-format (no functional changes), but exempted custom include order in keyboard.c and main.c --- shm_open.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'shm_open.c') diff --git a/shm_open.c b/shm_open.c index 05cb571..1dfa81a 100644 --- a/shm_open.c +++ b/shm_open.c @@ -6,21 +6,19 @@ #include static void -randname(char *buf) -{ +randname(char *buf) { struct timespec ts; long r; clock_gettime(CLOCK_REALTIME, &ts); r = ts.tv_nsec; for (int i = 0; i < 6; ++i) { - buf[i] = 'A'+(r&15)+(r&16)*2; + buf[i] = 'A' + (r & 15) + (r & 16) * 2; r >>= 5; } } static int -create_shm_file(void) -{ +create_shm_file(void) { int retries = 100; int fd; do { @@ -37,8 +35,7 @@ create_shm_file(void) } int -allocate_shm_file(size_t size) -{ +allocate_shm_file(size_t size) { int fd = create_shm_file(); int ret; if (fd < 0) @@ -52,4 +49,3 @@ allocate_shm_file(size_t size) } return fd; } - -- cgit 1.4.1