From 1449bfc5e960a61438c60a67c28da6d7c5bf2c7f Mon Sep 17 00:00:00 2001 From: Berke Kocaoğlu Date: Mon, 11 Oct 2021 06:07:18 +0300 Subject: code-style: fix consistency issues all over the codebase (#94) * remove duplicate comment * remove empty tabs and blank lines * move macros and globals ontop * comment to seprate function implementation * fix alignment * switch to *argv[] similar to other suckless code * kill all empty last lines * append comment to endif * reuse existing ARRLEN macro * comment fall through * use while (true) everywhere Co-authored-by: NRK --- util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'util.c') diff --git a/util.c b/util.c index fa0f0e3..6028eb7 100644 --- a/util.c +++ b/util.c @@ -30,7 +30,7 @@ const char *progname; void* emalloc(size_t size) { void *ptr; - + ptr = malloc(size); if (ptr == NULL) error(EXIT_FAILURE, errno, NULL); @@ -172,7 +172,7 @@ char* r_readdir(r_dir_t *rdir, bool skip_dotfiles) } return filename; } - + if (rdir->recursive && rdir->stlen > 0) { /* open next subdirectory */ closedir(rdir->dir); @@ -210,4 +210,3 @@ int r_mkdir(char *path) } return 0; } - -- cgit v1.2.3-54-g00ecf