tree-wide: minor formatting inconsistency cleanups

This commit is contained in:
Vito Caputo
2016-02-23 09:52:52 -08:00
parent c550f7a9b8
commit 9ed794a32d
46 changed files with 76 additions and 76 deletions

View File

@@ -60,7 +60,7 @@
svg(" <text class=\"%s\" x=\"%.03f\" y=\"%.03f\">", (b) ? "left" : "right", SCALE_X * (x) + (b ? 5.0 : -5.0), SCALE_Y * (y) + 14.0); \
svg(format, ## __VA_ARGS__); \
svg("</text>\n"); \
} while(false)
} while (false)
static enum dot {
DEP_ALL,

View File

@@ -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;

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;

View File

@@ -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) \

View File

@@ -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 */

View File

@@ -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

View File

@@ -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;

View File

@@ -73,4 +73,4 @@ do { \
assert_not_reached("Unknown format string argument."); \
} \
} \
} while(false)
} while (false)

View File

@@ -281,9 +281,9 @@ EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_
if (EFI_ERROR(err))
goto err;
if(dib->x < GraphicsOutput->Mode->Info->HorizontalResolution)
if (dib->x < GraphicsOutput->Mode->Info->HorizontalResolution)
x_pos = (GraphicsOutput->Mode->Info->HorizontalResolution - dib->x) / 2;
if(dib->y < GraphicsOutput->Mode->Info->VerticalResolution)
if (dib->y < GraphicsOutput->Mode->Info->VerticalResolution)
y_pos = (GraphicsOutput->Mode->Info->VerticalResolution - dib->y) / 2;
uefi_call_wrapper(GraphicsOutput->Blt, 10, GraphicsOutput,

View File

@@ -119,7 +119,7 @@ int config_parse_unit_deps(
assert(rvalue);
p = rvalue;
for(;;) {
for (;;) {
_cleanup_free_ char *word = NULL, *k = NULL;
int r;
@@ -1599,7 +1599,7 @@ int config_parse_service_sockets(
assert(data);
p = rvalue;
for(;;) {
for (;;) {
_cleanup_free_ char *word = NULL, *k = NULL;
r = extract_first_word(&p, &word, NULL, 0);
@@ -3361,7 +3361,7 @@ int config_parse_protect_home(
ProtectHome h;
h = protect_home_from_string(rvalue);
if (h < 0){
if (h < 0) {
log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse protect home value, ignoring: %s", rvalue);
return 0;
}
@@ -3404,7 +3404,7 @@ int config_parse_protect_system(
ProtectSystem s;
s = protect_system_from_string(rvalue);
if (s < 0){
if (s < 0) {
log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse protect system value, ignoring: %s", rvalue);
return 0;
}

View File

@@ -431,7 +431,7 @@ finish:
hashmap_free_free(top);
hashmap_free_free(bottom);
HASHMAP_FOREACH_KEY(h, key, drops, i){
HASHMAP_FOREACH_KEY(h, key, drops, i) {
hashmap_free_free(hashmap_remove(drops, key));
hashmap_remove(drops, key);
free(key);

View File

@@ -391,7 +391,7 @@
entry = document.getElementById("tableentry");
var buf = "";
for (var key in d){
for (var key in d) {
var data = d[key];
if (data == null)

View File

@@ -75,7 +75,7 @@ static void close_fd_input(Uploader *u);
curl_easy_strerror(code)); \
cmd; \
} \
} while(0)
} while (0)
static size_t output_callback(char *buf,
size_t size,

View File

@@ -50,7 +50,7 @@
*_f = alloca(_fl + 10); \
memcpy(*_f, "CODE_FUNC=", 10); \
memcpy(*_f + 10, _func, _fl); \
} while(false)
} while (false)
/* We open a single fd, and we'll share it with the current process,
* all its threads, and all its subprocesses. This means we need to

View File

@@ -97,20 +97,20 @@ static void flush_progress(void) {
fflush(stdout);
}
#define debug(_offset, _fmt, ...) do{ \
#define debug(_offset, _fmt, ...) do { \
flush_progress(); \
log_debug(OFSfmt": " _fmt, _offset, ##__VA_ARGS__); \
} while(0)
} while (0)
#define warning(_offset, _fmt, ...) do{ \
#define warning(_offset, _fmt, ...) do { \
flush_progress(); \
log_warning(OFSfmt": " _fmt, _offset, ##__VA_ARGS__); \
} while(0)
} while (0)
#define error(_offset, _fmt, ...) do{ \
#define error(_offset, _fmt, ...) do { \
flush_progress(); \
log_error(OFSfmt": " _fmt, (uint64_t)_offset, ##__VA_ARGS__); \
} while(0)
} while (0)
static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o) {
uint64_t i;

View File

@@ -1407,7 +1407,7 @@ static int server_parse_proc_cmdline(Server *s) {
}
p = line;
for(;;) {
for (;;) {
_cleanup_free_ char *word = NULL;
r = extract_first_word(&p, &word, NULL, 0);

View File

@@ -1063,7 +1063,7 @@ _public_ int sd_journal_test_cursor(sd_journal *j, const char *cursor) {
if (r < 0)
return r;
for(;;) {
for (;;) {
_cleanup_free_ char *item = NULL;
unsigned long long ll;
sd_id128_t id;

View File

@@ -482,7 +482,7 @@ int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t
return -ENOMEM;
entry = strndup(word, len);
if(!entry)
if (!entry)
return -ENOMEM;
tok = entry;

Some files were not shown because too many files have changed in this diff Show More