From 604b503b84b58b0aac8e1061b33e9ed0f7e1bf88 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sat, 23 Jan 2016 11:13:15 +0100 Subject: [PATCH] Fix issue #2: GCC6 -Wmisleading-indentation causing FTBFS in pimd - Add function comment - Fix misleading indentaion - Fix coding sttle Signed-off-by: Joachim Nilsson --- lite.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lite.h b/lite.h index 18059da..54e4c28 100644 --- a/lite.h +++ b/lite.h @@ -130,12 +130,16 @@ int tree(char *path, int show_perms); #define UNUSED(x) UNUSED_ ## x __attribute__ ((unused)) #endif - +/* Does directory end with a slash? */ static inline int fisslashdir(char *dir) { - if (!dir) return 0; - if (strlen (dir) > 0) return dir[strlen (dir) - 1] == '/'; - return 0; + if (!dir) + return 0; + + if (strlen(dir) > 0) + return dir[strlen(dir) - 1] == '/'; + + return 0; } /* Convert string to natural number (0-2147483647), returns -1 on error. */