Merge pull request #2724 from vcaputo/minor-formatting-cleanups
tree-wide: minor formatting inconsistency cleanups
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+7
-7
@@ -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) \
|
||||
|
||||
+1
-1
@@ -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 */
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -73,4 +73,4 @@ do { \
|
||||
assert_not_reached("Unknown format string argument."); \
|
||||
} \
|
||||
} \
|
||||
} while(false)
|
||||
} while (false)
|
||||
|
||||
Reference in New Issue
Block a user