Fix issue #2: GCC6 -Wmisleading-indentation causing FTBFS in pimd

- Add function comment
- Fix misleading indentaion
- Fix coding sttle

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-01-23 11:16:53 +01:00
parent 5fc248522c
commit 604b503b84
+8 -4
View File
@@ -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. */