summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorVito Caputo <vito.caputo@coreos.com>2016-02-23 09:52:52 -0800
committerVito Caputo <vito.caputo@coreos.com>2016-02-23 14:20:34 -0800
commit9ed794a32d4824c6a42fc222ea1054bb3d1394d7 (patch)
treed7e00abb5c3434b1c74208c0d5b6e7516b9eceb9 /src/basic
parentc550f7a9b89d017215af084288bc44f736f774fe (diff)
tree-wide: minor formatting inconsistency cleanups
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/MurmurHash2.c2
-rw-r--r--src/basic/calendarspec.c2
-rw-r--r--src/basic/cgroup-util.c2
-rw-r--r--src/basic/io-util.h2
-rw-r--r--src/basic/list.h14
-rw-r--r--src/basic/log.h2
-rw-r--r--src/basic/macro.h2
-rw-r--r--src/basic/parse-util.c2
-rw-r--r--src/basic/stdio-util.h2
9 files changed, 15 insertions, 15 deletions
diff --git a/src/basic/MurmurHash2.c b/src/basic/MurmurHash2.c
index 2f4149dbe9..9020793930 100644
--- a/src/basic/MurmurHash2.c
+++ b/src/basic/MurmurHash2.c
@@ -50,7 +50,7 @@ uint32_t MurmurHash2 ( const void * key, int len, uint32_t seed )
const unsigned char * data = (const unsigned char *)key;
- while(len >= 4)
+ while (len >= 4)
{
uint32_t k = *(uint32_t*)data;
diff --git a/src/basic/calendarspec.c b/src/basic/calendarspec.c
index b1f2a511f3..6e0bab9b94 100644
--- a/src/basic/calendarspec.c
+++ b/src/basic/calendarspec.c
@@ -114,7 +114,7 @@ static void sort_chain(CalendarComponent **c) {
static void fix_year(CalendarComponent *c) {
/* Turns 12 → 2012, 89 → 1989 */
- while(c) {
+ while (c) {
CalendarComponent *n = c->next;
if (c->value >= 0 && c->value < 70)
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 6ef00d51df..56c1fcaab9 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -1248,7 +1248,7 @@ int cg_pid_get_path_shifted(pid_t pid, const char *root, char **cgroup) {
return 0;
}
-int cg_path_decode_unit(const char *cgroup, char **unit){
+int cg_path_decode_unit(const char *cgroup, char **unit) {
char *c, *s;
size_t n;
diff --git a/src/basic/io-util.h b/src/basic/io-util.h
index 142c940d92..4684ed3bfc 100644
--- a/src/basic/io-util.h
+++ b/src/basic/io-util.h
@@ -46,7 +46,7 @@ ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length);
char *_s = (char *)(s); \
_i->iov_base = _s; \
_i->iov_len = strlen(_s); \
- } while(false)
+ } while (false)
static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, unsigned n) {
unsigned j;
diff --git a/src/basic/list.h b/src/basic/list.h
index c68185f587..5962aa4211 100644
--- a/src/basic/list.h
+++ b/src/basic/list.h
@@ -32,7 +32,7 @@
#define LIST_HEAD_INIT(head) \
do { \
(head) = NULL; } \
- while(false)
+ while (false)
/* Initialize a list item */
#define LIST_INIT(name,item) \
@@ -40,7 +40,7 @@
typeof(*(item)) *_item = (item); \
assert(_item); \
_item->name##_prev = _item->name##_next = NULL; \
- } while(false)
+ } while (false)
/* Prepend an item to the list */
#define LIST_PREPEND(name,head,item) \
@@ -51,7 +51,7 @@
_item->name##_next->name##_prev = _item; \
_item->name##_prev = NULL; \
*_head = _item; \
- } while(false)
+ } while (false)
/* Append an item to the list */
#define LIST_APPEND(name,head,item) \
@@ -59,7 +59,7 @@
typeof(*(head)) *_tail; \
LIST_FIND_TAIL(name,head,_tail); \
LIST_INSERT_AFTER(name,head,_tail,item); \
- } while(false)
+ } while (false)
/* Remove an item from the list */
#define LIST_REMOVE(name,head,item) \
@@ -75,7 +75,7 @@
*_head = _item->name##_next; \
} \
_item->name##_next = _item->name##_prev = NULL; \
- } while(false)
+ } while (false)
/* Find the head of the list */
#define LIST_FIND_HEAD(name,item,head) \
@@ -119,7 +119,7 @@
_b->name##_prev = _a; \
_a->name##_next = _b; \
} \
- } while(false)
+ } while (false)
/* Insert an item before another one (a = where, b = what) */
#define LIST_INSERT_BEFORE(name,head,a,b) \
@@ -145,7 +145,7 @@
_b->name##_next = _a; \
_a->name##_prev = _b; \
} \
- } while(false)
+ } while (false)
#define LIST_JUST_US(name,item) \
(!(item)->name##_prev && !(item)->name##_next) \
diff --git a/src/basic/log.h b/src/basic/log.h
index 60ddead74c..f9fb1742a1 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -193,7 +193,7 @@ void log_assert_failed_return(
#ifdef LOG_TRACE
# define log_trace(...) log_debug(__VA_ARGS__)
#else
-# define log_trace(...) do {} while(0)
+# define log_trace(...) do {} while (0)
#endif
/* Structured logging */
diff --git a/src/basic/macro.h b/src/basic/macro.h
index 2695d0edb7..ddf0968d1b 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -224,7 +224,7 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
/* We override the glibc assert() here. */
#undef assert
#ifdef NDEBUG
-#define assert(expr) do {} while(false)
+#define assert(expr) do {} while (false)
#else
#define assert(expr) assert_message_se(expr, #expr)
#endif
diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c
index a3cb81b040..6c11b605a9 100644
--- a/src/basic/parse-util.c
+++ b/src/basic/parse-util.c
@@ -505,7 +505,7 @@ int parse_fractional_part_u(const char **p, size_t digits, unsigned *res) {
s = *p;
/* accept any number of digits, strtoull is limted to 19 */
- for(i=0; i < digits; i++,s++) {
+ for (i=0; i < digits; i++,s++) {
if (*s < '0' || *s > '9') {
if (i == 0)
return -EINVAL;
diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h
index 0a675571ff..bd1144b4c9 100644
--- a/src/basic/stdio-util.h
+++ b/src/basic/stdio-util.h
@@ -73,4 +73,4 @@ do { \
assert_not_reached("Unknown format string argument."); \
} \
} \
-} while(false)
+} while (false)