Skip to content

Commit 95cd219

Browse files
authored
Merge pull request systemd#22939 from yuwata/tree-wide-space
tree-wide: add space after if, switch, for, and while
2 parents b17a681 + 7989311 commit 95cd219

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+88
-82
lines changed

src/basic/arphrd-to-name.awk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
BEGIN{
44
print "const char *arphrd_to_name(int id) {"
5-
print " switch(id) {"
5+
print " switch (id) {"
66
}
77
!/^HDLC$/ {
88
printf " case ARPHRD_%s: return \"%s\";\n", $1, $1

src/basic/hashmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ struct _packed_ indirect_storage {
162162
unsigned n_buckets; /* number of buckets */
163163

164164
unsigned idx_lowest_entry; /* Index below which all buckets are free.
165-
Makes "while(hashmap_steal_first())" loops
165+
Makes "while (hashmap_steal_first())" loops
166166
O(n) instead of O(n^2) for unordered hashmaps. */
167167
uint8_t _pad[3]; /* padding for the whole HashmapBase */
168168
/* The bitfields in HashmapBase complete the alignment of the whole thing. */

src/basic/socket-util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ struct cmsghdr* cmsg_find(struct msghdr *mh, int level, int type, socklen_t leng
228228
({ \
229229
const union sockaddr_union *__sa = &(sa); \
230230
size_t _len; \
231-
switch(__sa->sa.sa_family) { \
231+
switch (__sa->sa.sa_family) { \
232232
case AF_INET: \
233233
_len = sizeof(struct sockaddr_in); \
234234
break; \

src/basic/string-table.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
113113
fputc_unlocked('\n', stdout); \
114114
} \
115115
funlockfile(stdout); \
116-
} while(false)
116+
} while (false)

src/basic/xattr-util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int getxattr_at_malloc(
7070
by_procfs = true; /* fgetxattr() is not going to work, go via /proc/ link right-away */
7171
}
7272

73-
for(;;) {
73+
for (;;) {
7474
_cleanup_free_ char *v = NULL;
7575
ssize_t n;
7676

src/boot/efi/xbootldr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static BOOLEAN verify_gpt(union GptHeaderBuffer *gpt_header_buffer, EFI_LBA lba_
3535
h = &gpt_header_buffer->gpt_header;
3636

3737
/* Some superficial validation of the GPT header */
38-
if(CompareMem(&h->Header.Signature, "EFI PART", sizeof(h->Header.Signature) != 0))
38+
if (CompareMem(&h->Header.Signature, "EFI PART", sizeof(h->Header.Signature) != 0))
3939
return FALSE;
4040

4141
if (h->Header.HeaderSize < 92 || h->Header.HeaderSize > 512)

src/core/bpf-devices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static int bpf_access_type(const char *acc) {
2222
assert(acc);
2323

2424
for (; *acc; acc++)
25-
switch(*acc) {
25+
switch (*acc) {
2626
case 'r':
2727
r |= BPF_DEVCG_ACC_READ;
2828
break;

src/core/dbus-manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2162,7 +2162,7 @@ static int install_error(
21622162

21632163
for (size_t i = 0; i < n_changes; i++)
21642164

2165-
switch(changes[i].type_or_errno) {
2165+
switch (changes[i].type_or_errno) {
21662166

21672167
case 0 ... _UNIT_FILE_CHANGE_TYPE_MAX: /* not errors */
21682168
continue;

src/core/selinux-access.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static int audit_callback(
6969
}
7070

7171
static int callback_type_to_priority(int type) {
72-
switch(type) {
72+
switch (type) {
7373

7474
case SELINUX_ERROR:
7575
return LOG_ERR;

src/core/smack-setup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ int mac_smack_setup(bool *loaded_policy) {
304304
assert(loaded_policy);
305305

306306
r = write_access2_rules("/etc/smack/accesses.d/");
307-
switch(r) {
307+
switch (r) {
308308
case -ENOENT:
309309
log_debug("Smack is not enabled in the kernel.");
310310
return 0;
@@ -336,7 +336,7 @@ int mac_smack_setup(bool *loaded_policy) {
336336
#endif
337337

338338
r = write_cipso2_rules("/etc/smack/cipso.d/");
339-
switch(r) {
339+
switch (r) {
340340
case -ENOENT:
341341
log_debug("Smack/CIPSO is not enabled in the kernel.");
342342
return 0;
@@ -352,7 +352,7 @@ int mac_smack_setup(bool *loaded_policy) {
352352
}
353353

354354
r = write_netlabel_rules("/etc/smack/netlabel.d/");
355-
switch(r) {
355+
switch (r) {
356356
case -ENOENT:
357357
log_debug("Smack/CIPSO is not enabled in the kernel.");
358358
return 0;
@@ -368,7 +368,7 @@ int mac_smack_setup(bool *loaded_policy) {
368368
}
369369

370370
r = write_onlycap_list();
371-
switch(r) {
371+
switch (r) {
372372
case -ENOENT:
373373
log_debug("Smack is not enabled in the kernel.");
374374
break;

0 commit comments

Comments
 (0)