aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rc/rc-selinux.h6
-rw-r--r--src/rc/rc.c2
-rwxr-xr-xsrc/test/runtests.sh3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/rc/rc-selinux.h b/src/rc/rc-selinux.h
index 6bc1accb..c3258d99 100644
--- a/src/rc/rc-selinux.h
+++ b/src/rc/rc-selinux.h
@@ -25,10 +25,10 @@ void selinux_setup(char **argv);
/* always return false for selinux_util_open() */
#define selinux_util_open() (0)
-#define selinux_util_label(x) do { } while(0)
-#define selinux_util_close() do { } while(0)
+#define selinux_util_label(x) do { } while (0)
+#define selinux_util_close() do { } while (0)
-#define selinux_setup(x) do { } while(0)
+#define selinux_setup(x) do { } while (0)
#endif
diff --git a/src/rc/rc.c b/src/rc/rc.c
index 7836341e..4efa0cf9 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -282,7 +282,7 @@ open_shell(void)
#ifdef __linux__
const char *sys = rc_sys();
-
+
/* VSERVER systems cannot really drop to shells */
if (sys && strcmp(sys, RC_SYS_VSERVER) == 0)
{
diff --git a/src/test/runtests.sh b/src/test/runtests.sh
index 5a87c847..1736dd55 100755
--- a/src/test/runtests.sh
+++ b/src/test/runtests.sh
@@ -85,12 +85,14 @@ eend $? "Trailing newlines need to be deleted:"$'\n'"${out}"
ebegin "Checking for obsolete functions"
out=$(cd ${top_srcdir}; find src -name '*.[ch]' \
+ ! -name queue.h \
-exec grep -n -E '\<(malloc|memory|sys/(errno|fcntl|signal|stropts|termios|unistd))\.h\>' {} +)
[ -z "${out}" ]
eend $? "Avoid these obsolete functions:"$'\n'"${out}"
ebegin "Checking for x* func usage"
out=$(cd ${top_srcdir}; find src -name '*.[ch]' \
+ ! -name queue.h \
-exec grep -n -E '\<(malloc|strdup)[[:space:]]*\(' {} + \
| grep -v \
-e src/includes/helpers.h \
@@ -100,6 +102,7 @@ eend $? "These need to be using the x* variant:"$'\n'"${out}"
ebegin "Checking spacing style"
out=$(cd ${top_srcdir}; find src -name '*.[ch]' \
+ ! -name queue.h \
-exec grep -n -E \
-e '\<(for|if|switch|while)\(' \
-e '\<(for|if|switch|while) \( ' \