summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-12-03 22:27:45 +0100
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-12-03 22:27:45 +0100
commitf168c27313e4d7b0aabee037dc9c78a5799f0597 (patch)
treedf9ad884b2fdf45f519d04075dc67c8b82bb2915 /src/shared
parent53ab52ac6d2a12ba24f3cfd618c12c99871947ed (diff)
trivial coding style clean ups
- Add space between if/for and the opening parentheses - Place the opening brace on same line as the function (not for udev) From the CODING_STYLE Try to use this: void foo() { } instead of this: void foo() { }
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/ioprio.h6
-rw-r--r--src/shared/linux/auto_dev-ioctl.h3
-rw-r--r--src/shared/strxcpyx.c12
-rw-r--r--src/shared/util.c2
4 files changed, 8 insertions, 15 deletions
diff --git a/src/shared/ioprio.h b/src/shared/ioprio.h
index 9800fc2553..e5c71d0043 100644
--- a/src/shared/ioprio.h
+++ b/src/shared/ioprio.h
@@ -44,13 +44,11 @@ enum {
IOPRIO_WHO_USER,
};
-static inline int ioprio_set(int which, int who, int ioprio)
-{
+static inline int ioprio_set(int which, int who, int ioprio) {
return syscall(__NR_ioprio_set, which, who, ioprio);
}
-static inline int ioprio_get(int which, int who)
-{
+static inline int ioprio_get(int which, int who) {
return syscall(__NR_ioprio_get, which, who);
}
diff --git a/src/shared/linux/auto_dev-ioctl.h b/src/shared/linux/auto_dev-ioctl.h
index 850f39b33e..aeaeb3ea7a 100644
--- a/src/shared/linux/auto_dev-ioctl.h
+++ b/src/shared/linux/auto_dev-ioctl.h
@@ -118,8 +118,7 @@ struct autofs_dev_ioctl {
char path[0];
};
-static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in)
-{
+static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) {
memset(in, 0, sizeof(struct autofs_dev_ioctl));
in->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR;
in->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR;
diff --git a/src/shared/strxcpyx.c b/src/shared/strxcpyx.c
index 3cb04b25cd..6542c0abf5 100644
--- a/src/shared/strxcpyx.c
+++ b/src/shared/strxcpyx.c
@@ -29,8 +29,7 @@
#include <string.h>
#include "strxcpyx.h"
-size_t strpcpy(char **dest, size_t size, const char *src)
-{
+size_t strpcpy(char **dest, size_t size, const char *src) {
size_t len;
len = strlen(src);
@@ -48,8 +47,7 @@ size_t strpcpy(char **dest, size_t size, const char *src)
return size;
}
-size_t strpcpyf(char **dest, size_t size, const char *src, ...)
-{
+size_t strpcpyf(char **dest, size_t size, const char *src, ...) {
va_list va;
int i;
@@ -67,8 +65,7 @@ size_t strpcpyf(char **dest, size_t size, const char *src, ...)
return size;
}
-size_t strpcpyl(char **dest, size_t size, const char *src, ...)
-{
+size_t strpcpyl(char **dest, size_t size, const char *src, ...) {
va_list va;
va_start(va, src);
@@ -80,8 +77,7 @@ size_t strpcpyl(char **dest, size_t size, const char *src, ...)
return size;
}
-size_t strscpy(char *dest, size_t size, const char *src)
-{
+size_t strscpy(char *dest, size_t size, const char *src) {
char *s;
s = dest;
diff --git a/src/shared/util.c b/src/shared/util.c
index b4ed2c407c..efd3468fb6 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5379,7 +5379,7 @@ bool is_locale_utf8(void) {
goto out;
}
- if(streq(set, "UTF-8")) {
+ if (streq(set, "UTF-8")) {
cached_answer = true;
goto out;
}