]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: add a space after if, switch, for, and while 22939/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Apr 2022 13:37:21 +0000 (22:37 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 1 Apr 2022 13:48:42 +0000 (22:48 +0900)
56 files changed:
src/basic/arphrd-to-name.awk
src/basic/hashmap.c
src/basic/socket-util.h
src/basic/string-table.h
src/basic/xattr-util.c
src/boot/efi/xbootldr.c
src/core/bpf-devices.c
src/core/dbus-manager.c
src/core/selinux-access.c
src/core/smack-setup.c
src/core/socket.c
src/coredump/coredumpctl.c
src/fundamental/macro-fundamental.h
src/hostname/hostnamed.c
src/hwdb/hwdb.c
src/journal-remote/journal-gatewayd.c
src/journal-remote/journal-remote-main.c
src/journal-remote/journal-remote.c
src/journal-remote/journal-upload-journal.c
src/journal-remote/journal-upload.c
src/journal/journald-server.c
src/libsystemd-network/dhcp6-option.c
src/libsystemd-network/sd-dhcp-client.c
src/libsystemd-network/sd-dhcp-lease.c
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/sd-dhcp6-lease.c
src/libsystemd-network/test-dhcp-client.c
src/libsystemd-network/test-dhcp-option.c
src/libsystemd-network/test-ipv4ll.c
src/libsystemd/sd-journal/audit_type-to-name.awk
src/libsystemd/sd-netlink/netlink-message-rtnl.c
src/libsystemd/sd-netlink/netlink-types.c
src/libsystemd/sd-path/sd-path.c
src/partition/growfs.c
src/resolve/dns_type-to-name.awk
src/resolve/resolvconf-compat.c
src/resolve/resolvectl.c
src/resolve/resolved-dns-packet.c
src/resolve/resolved-dns-rr.c
src/resolve/resolved-dnstls-gnutls.c
src/shared/conf-parser.c
src/shared/ethtool-util.c
src/shared/in-addr-prefix-util.c
src/shared/install.c
src/shared/journal-importer.c
src/shared/mount-util.c
src/shared/seccomp-util.c
src/shared/service-util.c
src/shared/udev-util.h
src/sleep/sleep.c
src/test/test-alloc-util.c
src/tmpfiles/test-offline-passwd.c
src/udev/cdrom_id/cdrom_id.c
src/udev/mtd_probe/probe_smartmedia.c
src/udev/udevadm-hwdb.c
src/udev/udevadm-info.c

index d25a4e9bcb33e3b2858aa9654c8c392a7fef1bd9..302504b6510ddd7e2b90ae2097656b8d0ba86cb9 100644 (file)
@@ -2,7 +2,7 @@
 
 BEGIN{
         print "const char *arphrd_to_name(int id) {"
-        print "        switch(id) {"
+        print "        switch (id) {"
 }
 !/^HDLC$/ {
         printf "        case ARPHRD_%s: return \"%s\";\n", $1, $1
index bd7a6b0d6e710cc03fed176e9207928a935098f9..1855367072590d79568a8ab2666ea690996cad9f 100644 (file)
@@ -162,7 +162,7 @@ struct _packed_ indirect_storage {
         unsigned n_buckets;                /* number of buckets */
 
         unsigned idx_lowest_entry;         /* Index below which all buckets are free.
-                                              Makes "while(hashmap_steal_first())" loops
+                                              Makes "while (hashmap_steal_first())" loops
                                               O(n) instead of O(n^2) for unordered hashmaps. */
         uint8_t  _pad[3];                  /* padding for the whole HashmapBase */
         /* The bitfields in HashmapBase complete the alignment of the whole thing. */
index 57e655154c5b050c848ecaf289750a6bb3e61231..2fd1a2a1659f3d119663d0c7deedd3a277b9bee8 100644 (file)
@@ -228,7 +228,7 @@ struct cmsghdr* cmsg_find(struct msghdr *mh, int level, int type, socklen_t leng
         ({                                                              \
                 const union sockaddr_union *__sa = &(sa);               \
                 size_t _len;                                            \
-                switch(__sa->sa.sa_family) {                            \
+                switch (__sa->sa.sa_family) {                           \
                 case AF_INET:                                           \
                         _len = sizeof(struct sockaddr_in);              \
                         break;                                          \
index 97c1adc07d94df44949e58460d6e7cf141ca2299..e3a26a623ca48443b7318c8e1287ac28760ba56b 100644 (file)
@@ -113,4 +113,4 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
                         fputc_unlocked('\n', stdout);                   \
                 }                                                       \
                 funlockfile(stdout);                                    \
-        } while(false)
+        } while (false)
index ac4fd7b1c55a277c9e7fd86e4c2ab7c14d9f183e..0b661d93250e43b3a425c18878fd4794625d80dc 100644 (file)
@@ -70,7 +70,7 @@ int getxattr_at_malloc(
                 by_procfs = true; /* fgetxattr() is not going to work, go via /proc/ link right-away */
         }
 
-        for(;;) {
+        for (;;) {
                 _cleanup_free_ char *v = NULL;
                 ssize_t n;
 
index 6fa7e49e5de64f15b5c4cd2201768466a7fb5057..793e3949b24140e355e5bd2b108a4bfb9a9d2ebe 100644 (file)
@@ -35,7 +35,7 @@ static BOOLEAN verify_gpt(union GptHeaderBuffer *gpt_header_buffer, EFI_LBA lba_
         h = &gpt_header_buffer->gpt_header;
 
         /* Some superficial validation of the GPT header */
-        if(CompareMem(&h->Header.Signature, "EFI PART", sizeof(h->Header.Signature) != 0))
+        if (CompareMem(&h->Header.Signature, "EFI PART", sizeof(h->Header.Signature) != 0))
                 return FALSE;
 
         if (h->Header.HeaderSize < 92 || h->Header.HeaderSize > 512)
index f62c6f193120a0cd23a575eff26872f40375f035..46996d28f4e7054384d98b5ab8e4ff62501e353f 100644 (file)
@@ -22,7 +22,7 @@ static int bpf_access_type(const char *acc) {
         assert(acc);
 
         for (; *acc; acc++)
-                switch(*acc) {
+                switch (*acc) {
                 case 'r':
                         r |= BPF_DEVCG_ACC_READ;
                         break;
index 572c59dda415a4a6cbba50b4e6412acf388888a6..6bf4e6bf762f6a86f4b3a470e948e96cc1af9293 100644 (file)
@@ -2162,7 +2162,7 @@ static int install_error(
 
         for (size_t i = 0; i < n_changes; i++)
 
-                switch(changes[i].type_or_errno) {
+                switch (changes[i].type_or_errno) {
 
                 case 0 ... _UNIT_FILE_CHANGE_TYPE_MAX: /* not errors */
                         continue;
index ad098e99dfa7c7a3693956b693e868f37722955e..d77901caa5f2c3d992162f5b1ad62f225e9d61ec 100644 (file)
@@ -69,7 +69,7 @@ static int audit_callback(
 }
 
 static int callback_type_to_priority(int type) {
-        switch(type) {
+        switch (type) {
 
         case SELINUX_ERROR:
                 return LOG_ERR;
index f88cb80834334a8f42ff42757efe3d929eaac94d..b76bb744650908cb930851a955589164f18658ee 100644 (file)
@@ -304,7 +304,7 @@ int mac_smack_setup(bool *loaded_policy) {
         assert(loaded_policy);
 
         r = write_access2_rules("/etc/smack/accesses.d/");
-        switch(r) {
+        switch (r) {
         case -ENOENT:
                 log_debug("Smack is not enabled in the kernel.");
                 return 0;
@@ -336,7 +336,7 @@ int mac_smack_setup(bool *loaded_policy) {
 #endif
 
         r = write_cipso2_rules("/etc/smack/cipso.d/");
-        switch(r) {
+        switch (r) {
         case -ENOENT:
                 log_debug("Smack/CIPSO is not enabled in the kernel.");
                 return 0;
@@ -352,7 +352,7 @@ int mac_smack_setup(bool *loaded_policy) {
         }
 
         r = write_netlabel_rules("/etc/smack/netlabel.d/");
-        switch(r) {
+        switch (r) {
         case -ENOENT:
                 log_debug("Smack/CIPSO is not enabled in the kernel.");
                 return 0;
@@ -368,7 +368,7 @@ int mac_smack_setup(bool *loaded_policy) {
         }
 
         r = write_onlycap_list();
-        switch(r) {
+        switch (r) {
         case -ENOENT:
                 log_debug("Smack is not enabled in the kernel.");
                 break;
index 802c6afde67c112cf4e86ecbb6c83acab512bdc7..0d96f1a933542118021dcb47e4a4247f883c9740 100644 (file)
@@ -439,7 +439,7 @@ static int peer_address_compare_func(const SocketPeer *x, const SocketPeer *y) {
         if (r != 0)
                 return r;
 
-        switch(x->peer.sa.sa_family) {
+        switch (x->peer.sa.sa_family) {
         case AF_INET:
                 return memcmp(&x->peer.in.sin_addr, &y->peer.in.sin_addr, sizeof(x->peer.in.sin_addr));
         case AF_INET6:
index 7235544285783904f8a25ca5bb85526c819c51a3..01e922a9624fa0b8fc7e52088314e82e6a93c1fa 100644 (file)
@@ -233,7 +233,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argv);
 
         while ((c = getopt_long(argc, argv, "hA:o:F:1D:rS:U:qn:", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
                 case 'h':
                         return verb_help(0, NULL, NULL);
 
index 15b93165dc2b33f00022cba4c3076f32cb73402f..1c198f6ad9aa4f550aa1428ceb614dd04867a302 100644 (file)
                                CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
                    (CASE_F,__VA_ARGS__)
 
-#define IN_SET(x, ...)                          \
-        ({                                      \
-                sd_bool _found = sd_false;      \
+#define IN_SET(x, ...)                                                  \
+        ({                                                              \
+                sd_bool _found = sd_false;                              \
                 /* If the build breaks in the line below, you need to extend the case macros. (We use "long double" as  \
                  * type for the array, in the hope that checkers such as ubsan don't complain that the initializers for \
                  * the array are not representable by the base type. Ideally we'd use typeof(x) as base type, but that  \
                  * doesn't work, as we want to use this on bitfields and gcc refuses typeof() on bitfields.) */         \
                 static const long double __assert_in_set[] _unused_ = { __VA_ARGS__ }; \
-                assert_cc(ELEMENTSOF(__assert_in_set) <= 20); \
-                switch(x) {                     \
-                FOR_EACH_MAKE_CASE(__VA_ARGS__) \
-                        _found = sd_true;       \
-                        break;                  \
-                default:                        \
-                        break;                  \
-                }                               \
-                _found;                         \
+                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
+                switch (x) {                                            \
+                FOR_EACH_MAKE_CASE(__VA_ARGS__)                         \
+                        _found = sd_true;                               \
+                       break;                                           \
+                default:                                                \
+                        break;                                          \
+                }                                                       \
+                _found;                                                 \
         })
 
 /* Takes inspiration from Rust's Option::take() method: reads and returns a pointer, but at the same time
index 5d381e157ba097b00a777f7a1933aebbf479d665..6c69818230782fb4169b6cd84dd4a70c04402bf3 100644 (file)
@@ -353,7 +353,7 @@ try_acpi:
          * http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf
          */
 
-        switch(t) {
+        switch (t) {
 
         case 1: /* Desktop */
         case 3: /* Workstation */
index 26c8d66067981bbb1857552eb0c2180a7c1de314..e70354e44450b2dece82f1c285ef6b5658811b8f 100644 (file)
@@ -74,7 +74,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argv);
 
         while ((c = getopt_long(argc, argv, "ust:r:h", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
 
                 case 'h':
                         return help();
index 38972fe1a96ff164ad418212dd098585bb79aee4..8fb07bc02f3899f119bb091f882c1b5696f4986b 100644 (file)
@@ -911,7 +911,7 @@ static int parse_argv(int argc, char *argv[]) {
 
         while ((c = getopt_long(argc, argv, "hD:", options, NULL)) >= 0)
 
-                switch(c) {
+                switch (c) {
 
                 case 'h':
                         return help();
index 7c3c9ff44ab90efb64358630fe78447bb31b241e..4fe5812d2f36901be7a4dcac6e05060bc3d3abe9 100644 (file)
@@ -858,7 +858,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argv);
 
         while ((c = getopt_long(argc, argv, "ho:", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
 
                 case 'h':
                         return help();
index d1f394b027ab30e1a6e9f479f4f972a6f9a85ae2..e8fe04165e07c7fd6d6fc1021de5e5c63e1f387d 100644 (file)
@@ -104,7 +104,7 @@ int journal_remote_get_writer(RemoteServer *s, const char *host, Writer **writer
         const void *key;
         int r;
 
-        switch(s->split_mode) {
+        switch (s->split_mode) {
         case JOURNAL_WRITE_SPLIT_NONE:
                 key = "one and only";
                 break;
@@ -495,7 +495,7 @@ static int accept_connection(
                 return log_error_errno(errno, "accept() on fd:%d failed: %m", fd);
         }
 
-        switch(socket_address_family(addr)) {
+        switch (socket_address_family(addr)) {
         case AF_INET:
         case AF_INET6: {
                 _cleanup_free_ char *a = NULL;
index 164ed6590cda683e62d49def1bdade18d81f5885..cf9c760202781a3f48557b7de860d8e06d23bb45 100644 (file)
@@ -24,7 +24,7 @@ static ssize_t write_entry(char *buf, size_t size, Uploader *u) {
 
         for (;;) {
 
-                switch(u->entry_state) {
+                switch (u->entry_state) {
                 case ENTRY_CURSOR: {
                         u->current_cursor = mfree(u->current_cursor);
 
index 6ccea604e68cc719abb5be283bcd3495e570e747..db6cedfb163f5034817da7959994f9a5da1a74dc 100644 (file)
@@ -668,7 +668,7 @@ static int parse_argv(int argc, char *argv[]) {
         opterr = 0;
 
         while ((c = getopt_long(argc, argv, "hu:mM:D:", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
                 case 'h':
                         return help();
 
index 2b3d3dc0379bbdcba1f10473a328246f4d1729db..fa091b1131eacf680d2192fba9db2d3cc7de70cf 100644 (file)
@@ -772,7 +772,7 @@ static void server_cache_hostname(Server *s) {
 }
 
 static bool shall_try_append_again(JournalFile *f, int r) {
-        switch(r) {
+        switch (r) {
 
         case -E2BIG:           /* Hit configured limit          */
         case -EFBIG:           /* Hit fs limit                  */
index 4e6ee7970e272ed738abb3774952ef4a0729e8bb..eccfbe8b655ebb0a74d05e865364d99354caa55c 100644 (file)
@@ -548,7 +548,7 @@ static int dhcp6_option_parse_ia_options(sd_dhcp6_client *client, const uint8_t
 
         assert(buf || buflen == 0);
 
-        for(size_t offset = 0; offset < buflen;) {
+        for (size_t offset = 0; offset < buflen;) {
                 const uint8_t *data;
                 size_t data_len;
                 uint16_t code;
@@ -557,7 +557,7 @@ static int dhcp6_option_parse_ia_options(sd_dhcp6_client *client, const uint8_t
                 if (r < 0)
                         return r;
 
-                switch(code) {
+                switch (code) {
                 case SD_DHCP6_OPTION_STATUS_CODE: {
                         _cleanup_free_ char *msg = NULL;
 
index e8534e8e869b8bff08ef84589f162650826cf5f3..d2c6361cb85510e4c7b26f4cfe0e4a1700cdcc4f 100644 (file)
@@ -247,7 +247,7 @@ int sd_dhcp_client_set_request_option(sd_dhcp_client *client, uint8_t option) {
         assert_return(client, -EINVAL);
         assert_return(IN_SET(client->state, DHCP_STATE_INIT, DHCP_STATE_STOPPED), -EBUSY);
 
-        switch(option) {
+        switch (option) {
 
         case SD_DHCP_OPTION_PAD:
         case SD_DHCP_OPTION_OVERLOAD:
index e6e0e08ab2ff51122e8fe59934f0a413471ef3b3..8de7c671df35d944a0e2e9112a8640720054e85f 100644 (file)
@@ -629,7 +629,7 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const void *option, void
 
         assert(lease);
 
-        switch(code) {
+        switch (code) {
 
         case SD_DHCP_OPTION_IP_ADDRESS_LEASE_TIME:
                 r = lease_parse_u32(option, len, &lease->lifetime, 1);
index 64f5286eadd4de6cea53a0e265b01b50565070ad..5c9ba9f61832c0d6026d611a0743dc3dd5f0dc8d 100644 (file)
@@ -737,7 +737,7 @@ static int parse_request(uint8_t code, uint8_t len, const void *option, void *us
 
         assert(req);
 
-        switch(code) {
+        switch (code) {
         case SD_DHCP_OPTION_IP_ADDRESS_LEASE_TIME:
                 if (len == 4)
                         req->lifetime = unaligned_read_be32(option);
@@ -1096,7 +1096,7 @@ int dhcp_server_handle_message(sd_dhcp_server *server, DHCPMessage *message, siz
         existing_lease = hashmap_get(server->bound_leases_by_client_id, &req->client_id);
         static_lease = hashmap_get(server->static_leases_by_client_id, &req->client_id);
 
-        switch(type) {
+        switch (type) {
 
         case DHCP_DISCOVER: {
                 be32_t address = INADDR_ANY;
index 8734e5a824b88aec2cd3251b2fe554d6796ff157..a4cc2c920cd209ebe4d00c1cc174e1a3ab0fea2c 100644 (file)
@@ -338,7 +338,7 @@ int dhcp6_lease_add_ntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t opt
                 if (r < 0)
                         return r;
 
-                switch(subopt) {
+                switch (subopt) {
                 case DHCP6_NTP_SUBOPTION_SRV_ADDR:
                 case DHCP6_NTP_SUBOPTION_MC_ADDR:
                         if (sublen != 16)
index 7497c3ef3a52ba3129fc12f49b4eb7753bbf758e..fb86e6c994c7f666fbe1670596bb56091cbb1d9d 100644 (file)
@@ -156,7 +156,7 @@ static void test_dhcp_identifier_set_iaid(void) {
 }
 
 static int check_options(uint8_t code, uint8_t len, const void *option, void *userdata) {
-        switch(code) {
+        switch (code) {
         case SD_DHCP_OPTION_CLIENT_IDENTIFIER:
         {
                 uint32_t iaid;
index b01b1f57a3ad4bc2c02b89c1209688398c15f11b..ec4f9706d55730392b5b1fe92ad36365738c9ecc 100644 (file)
@@ -53,7 +53,7 @@ static struct option_desc option_tests[] = {
 };
 
 static const char *dhcp_type(int type) {
-        switch(type) {
+        switch (type) {
         case DHCP_DISCOVER:
                 return "DHCPDISCOVER";
         case DHCP_OFFER:
@@ -125,7 +125,7 @@ static void test_ignore_opts(uint8_t *descoption, int *descpos, int *desclen) {
         assert_se(*descpos >= 0);
 
         while (*descpos < *desclen) {
-                switch(descoption[*descpos]) {
+                switch (descoption[*descpos]) {
                 case SD_DHCP_OPTION_PAD:
                         *descpos += 1;
                         break;
index e90e73459d9570f125ab76041a02eaa93ea03685..44d0bfe17c3038f0571614ac3834af64ff091c7c 100644 (file)
@@ -29,7 +29,7 @@ static void* basic_request_handler_userdata = (void*) 0xCABCAB;
 static void basic_request_handler(sd_ipv4ll *ll, int event, void *userdata) {
         assert_se(userdata == basic_request_handler_userdata);
 
-        switch(event) {
+        switch (event) {
                 case SD_IPV4LL_EVENT_STOP:
                         basic_request_handler_stop = 1;
                         break;
index 1657866a6a971a15e2de07fdb14069b575114182..a859c44d451c0ee3b4c8653c9d7b4a5941d0066c 100644 (file)
@@ -1,11 +1,14 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 BEGIN{
-        print "const char *audit_type_to_string(int type) {\n\tswitch(type) {"
+        print "const char *audit_type_to_string(int type) {"
+        print "        switch (type) {"
 }
 {
         printf "        case AUDIT_%s: return \"%s\";\n", $1, $1
 }
 END{
-        print "        default: return NULL;\n\t}\n}\n"
+        print "        default: return NULL;"
+        print "        }"
+        print "}"
 }
index 56fb74727e3aa73b222eefbc27904c40ee9bdba3..87b1c3c3c87f4205f5214c2df6f1e4678cd8ea6c 100644 (file)
@@ -277,7 +277,7 @@ int sd_rtnl_message_new_nexthop(sd_netlink *rtnl, sd_netlink_message **ret,
         int r;
 
         assert_return(rtnl_message_type_is_nexthop(nlmsg_type), -EINVAL);
-        switch(nlmsg_type) {
+        switch (nlmsg_type) {
         case RTM_DELNEXTHOP:
                 assert_return(nh_family == AF_UNSPEC, -EINVAL);
                 _fallthrough_;
index 051dac95c21c9e8979b90b472bac2a4ebcaf79e9..0a2a3effb28067cfdaeb91f1754201152ef835e6 100644 (file)
@@ -63,7 +63,7 @@ int type_system_root_get_type_system_and_header_size(
         if (IN_SET(type, NLMSG_DONE, NLMSG_ERROR))
                 nl_type = type_system_get_type(&basic_type_system, type);
         else
-                switch(nl->protocol) {
+                switch (nl->protocol) {
                 case NETLINK_ROUTE:
                         nl_type = rtnl_get_type(type);
                         break;
index 385cfd30065acbf0c78f608a33a135a1844f700f..ac33e349c06c83063fb569e4edc0e53a5935a289 100644 (file)
@@ -516,7 +516,7 @@ static int get_search(uint64_t type, char ***list) {
 
         assert(list);
 
-        switch(type) {
+        switch (type) {
 
         case SD_PATH_SEARCH_BINARIES:
                 return search_from_environment(list,
index af6a9ef600dad988c2a1834f01e2f287374f2381..0d1da2773f065815b91f2b83fc509fc1a53eb8fc 100644 (file)
@@ -165,7 +165,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argv);
 
         while ((c = getopt_long(argc, argv, "hn", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
                 case 'h':
                         return help();
 
index 2d9794b761b800b97ce724d95b4fed97e032dbb2..92187d5652c763af3b18304bbde252b1f41cd077 100644 (file)
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 BEGIN{
-        print "const char *dns_type_to_string(int type) {\n\tswitch(type) {"
+        print "const char *dns_type_to_string(int type) {"
+        print "        switch (type) {"
 }
 {
         printf "        case DNS_TYPE_%s: return ", $1;
@@ -9,5 +10,7 @@ BEGIN{
         printf "\"%s\";\n", $1
 }
 END{
-        print "        default: return NULL;\n\t}\n}\n"
+        print "        default: return NULL;"
+        print "        }"
+        print "}"
 }
index bf73830e943d19f9494b37ffc04ae3bf64c97d22..d95df29793bcf1c66c671038ab312262edfa8451 100644 (file)
@@ -136,7 +136,7 @@ int resolvconf_parse_argv(int argc, char *argv[]) {
         arg_mode = _MODE_INVALID;
 
         while ((c = getopt_long(argc, argv, "hadxpfm:uIi:l:Rr:vV", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
 
                 case 'h':
                         return resolvconf_help();
index 96a505f5e1f7c8088308a9d8bc95e78b4ef981f3..245c273fde0569aa8315c01b7a6ebd46ae521df1 100644 (file)
@@ -2753,7 +2753,7 @@ static int compat_parse_argv(int argc, char *argv[]) {
         assert(argv);
 
         while ((c = getopt_long(argc, argv, "h46i:t:c:p:", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
 
                 case 'h':
                         return compat_help();
@@ -3048,7 +3048,7 @@ static int native_parse_argv(int argc, char *argv[]) {
         assert(argv);
 
         while ((c = getopt_long(argc, argv, "h46i:t:c:p:", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
 
                 case 'h':
                         return native_help();
index 48b91d6870556cd7337f36fc1bc791f1e5aa9af3..50785a682389e40b853180057655419d273b91e1 100644 (file)
@@ -102,7 +102,7 @@ void dns_packet_set_flags(DnsPacket *p, bool dnssec_checking_disabled, bool trun
 
         h = DNS_PACKET_HEADER(p);
 
-        switch(p->protocol) {
+        switch (p->protocol) {
         case DNS_PROTOCOL_LLMNR:
                 assert(!truncated);
 
index 83140d79f87d06e91b1efebe816c3e1179bd8179..ff271486d7c19b60620f10f16adacb7cf7905828 100644 (file)
@@ -403,7 +403,7 @@ static DnsResourceRecord* dns_resource_record_free(DnsResourceRecord *rr) {
         assert(rr);
 
         if (rr->key) {
-                switch(rr->key->type) {
+                switch (rr->key->type) {
 
                 case DNS_TYPE_SRV:
                         free(rr->srv.name);
@@ -1166,7 +1166,7 @@ ssize_t dns_resource_record_payload(DnsResourceRecord *rr, void **out) {
         assert(rr);
         assert(out);
 
-        switch(rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) {
+        switch (rr->unparsable ? _DNS_TYPE_INVALID : rr->key->type) {
         case DNS_TYPE_SRV:
         case DNS_TYPE_PTR:
         case DNS_TYPE_NS:
index 8c8628ebbbde00aae4c10f13f35d53dbd0a560f3..acdad6fa9109488b13b3a5e89204ee9bc9c912b9 100644 (file)
@@ -185,7 +185,7 @@ ssize_t dnstls_stream_writev(DnsStream *stream, const struct iovec *iov, size_t
 
         ss = gnutls_record_uncork(stream->dnstls_data.session, 0);
         if (ss < 0)
-                switch(ss) {
+                switch (ss) {
                 case GNUTLS_E_INTERRUPTED:
                         return -EINTR;
                 case GNUTLS_E_AGAIN:
@@ -209,7 +209,7 @@ ssize_t dnstls_stream_read(DnsStream *stream, void *buf, size_t count) {
 
         ss = gnutls_record_recv(stream->dnstls_data.session, buf, count);
         if (ss < 0)
-                switch(ss) {
+                switch (ss) {
                 case GNUTLS_E_INTERRUPTED:
                         return -EINTR;
                 case GNUTLS_E_AGAIN:
index 23aed96b4825c9bfa7067b7b925520220f1d3752..aeea0a02d52d62407751330479117cee912c7553 100644 (file)
@@ -1074,7 +1074,7 @@ int config_parse_warn_compat(
 
         Disabled reason = ltype;
 
-        switch(reason) {
+        switch (reason) {
 
         case DISABLED_CONFIGURATION:
                 log_syntax(unit, LOG_DEBUG, filename, line, 0,
index 6c9aeb1c6c6483411473bc34706dcf46e2f7ce52..ef605346f24a7d2da04a7360336da91cf775610c 100644 (file)
@@ -393,7 +393,7 @@ int ethtool_get_permanent_hw_addr(int *ethtool_fd, const char *ifname, struct hw
                 if (dest != _v)                        \
                         updated = true;                \
                 dest = _v;                             \
-        } while(false)
+        } while (false)
 
 #define UPDATE_WITH_MAX(dest, max, val, updated)       \
         do {                                           \
@@ -404,7 +404,7 @@ int ethtool_get_permanent_hw_addr(int *ethtool_fd, const char *ifname, struct hw
                 if (dest != _v)                        \
                         updated = true;                \
                 dest = _v;                             \
-        } while(false)
+        } while (false)
 
 int ethtool_set_wol(
                 int *ethtool_fd,
index f907949c2200fbdd754f5e7189bff18b46f3b58d..e23b8f9d13d57197c194d7cc289819b0a2240a3f 100644 (file)
@@ -108,7 +108,7 @@ int in_addr_prefixes_reduce(Set *prefixes) {
         struct in_addr_prefix *p;
 
         SET_FOREACH(p, prefixes)
-                switch(p->family) {
+                switch (p->family) {
                 case AF_INET:
                         assert(p->prefixlen <= 32);
                         if (p->prefixlen == 0)
@@ -147,7 +147,7 @@ int in_addr_prefixes_reduce(Set *prefixes) {
                 if (p->prefixlen == 0)
                         continue;
 
-                switch(p->family) {
+                switch (p->family) {
                 case AF_INET:
                         prefixlens = ipv4_prefixlens;
                         n = &ipv4_n_prefixlens;
index 8e81ec41bf7cd60b1697daaec24ffeb152b8b599..58bccdcaa80d69a04f4dd63af3c4b853829cf3fc 100644 (file)
@@ -330,7 +330,7 @@ void unit_file_dump_changes(int r, const char *verb, const UnitFileChange *chang
         for (size_t i = 0; i < n_changes; i++) {
                 assert(verb || changes[i].type_or_errno >= 0);
 
-                switch(changes[i].type_or_errno) {
+                switch (changes[i].type_or_errno) {
                 case UNIT_FILE_SYMLINK:
                         if (!quiet)
                                 log_info("Created symlink %s %s %s.",
index c6caf9330a5c812f575726c544e5e74363205552..7c355b6c8921b73dbea7ec971e3be251493d45fe 100644 (file)
@@ -281,7 +281,7 @@ static int process_special_field(JournalImporter *imp, char *line) {
 int journal_importer_process_data(JournalImporter *imp) {
         int r;
 
-        switch(imp->state) {
+        switch (imp->state) {
         case IMPORTER_STATE_LINE: {
                 char *line, *sep;
                 size_t n = 0;
index 694c0383f56579c7a93c8c48479002217b8e7072..78f06b25fee32e20af464adf6c6ef8dea840d4af 100644 (file)
@@ -531,7 +531,7 @@ int mode_to_inaccessible_node(
         if (!runtime_dir)
                 runtime_dir = "/run";
 
-        switch(mode & S_IFMT) {
+        switch (mode & S_IFMT) {
                 case S_IFREG:
                         node = "/systemd/inaccessible/reg";
                         break;
index e597a156cff730c611749e75003f4f600cbbcdc9..c465bf58ddd99d0e4c9e5c1e391aab21b74e987f 100644 (file)
@@ -107,7 +107,7 @@ const char* seccomp_arch_to_string(uint32_t c) {
          * Names used here should be the same as those used for ConditionArchitecture=,
          * except for "subarchitectures" like x32. */
 
-        switch(c) {
+        switch (c) {
         case SCMP_ARCH_NATIVE:
                 return "native";
         case SCMP_ARCH_X86:
index 99b1108b7721221f5b6297ff06711618b79ceaed..68aa5775f5ac4d7bfdeda00f66f75912ba752ae2 100644 (file)
@@ -58,7 +58,7 @@ int service_parse_argv(
         assert(argv);
 
         while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
 
                 case 'h':
                         return help(argv[0], service, description, bus_objects);
index a48beb95ea448217faade638fc8fa651c6c4743b..ce016e88db3a811d2e40e4ad3bbca5e4e385664f 100644 (file)
@@ -79,7 +79,7 @@ bool udev_available(void);
                 (void) sd_device_get_syspath(_d, &_p);                                                     \
                 (void) sd_device_get_subsystem(_d, &_s);                                                   \
                 STAP_PROBEV(udev, name, device_action_to_string(_a), _n, _p, _s __VA_OPT__(,) __VA_ARGS__);\
-        } while(false);
+        } while (false);
 #else
 #define DEVICE_TRACE_POINT(name, dev, ...) ((void) 0)
 #endif
index f108529bbdfe49f005f0e2640e01a5e9e4b76c9b..65e391d02ad7af39cf0880cb94e7e0c92330690e 100644 (file)
@@ -352,7 +352,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argv);
 
         while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
                 case 'h':
                         return help();
 
index 05c3195d6e8ccf46def56b43570a98e7157970f2..f2064cf2ed3edcd47479630e09710546ddd97e84 100644 (file)
@@ -163,7 +163,7 @@ TEST(auto_erase_memory) {
                 assert_se(MALLOC_SIZEOF_SAFE(f) >= sizeof(*f) * n);     \
                 assert_se(malloc_usable_size(f) >= sizeof(*f) * n);     \
                 assert_se(__builtin_object_size(f, 0) >= sizeof(*f) * n); \
-        } while(false)
+        } while (false)
 
 TEST(malloc_size_safe) {
         _cleanup_free_ uint32_t *f = NULL;
index 5978e69b864decd3c5f365b645793b81562633e7..b70cef47531ea3dccd1cf9b3a77e363661257d9e 100644 (file)
@@ -51,7 +51,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert_se(argv);
 
         while ((c = getopt_long(argc, argv, "r:", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
                 case 'r':
                         arg_root = optarg;
                         break;
index cdb66bb3b7b0b858a0d9816969f3ba23ad3ed5ea..85cf5201c6a1d9960debfb60ddcfef89e9bd6460 100644 (file)
@@ -541,7 +541,7 @@ static int dvd_ram_media_update_state(Context *c) {
                 return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
                                        "Invalid format capacities length.");
 
-        switch(format[8] & 3) {
+        switch (format[8] & 3) {
         case 1:
                 /* This means that last format was interrupted or failed, blank dvd-ram discs are
                  * factory formatted. Take no action here as it takes quite a while to reformat a
index f4612ba4f9cf4ece1911268afe103d89004603c8..368fab8827313e4383544585f08a2b1f3a664cb6 100644 (file)
@@ -61,7 +61,7 @@ int probe_smart_media(int mtd_fd, mtd_info_t* info) {
                 return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
                                        "Unexpected sector size: %i", sector_size);
 
-        switch(size_in_megs) {
+        switch (size_in_megs) {
         case 1:
         case 2:
                 spare_count = 6;
index e9db2847cf1f6d94c576ab855fb0b8a190195ba5..162b3516b81a30eb0d2c2c75e55260dfce68d66e 100644 (file)
@@ -48,7 +48,7 @@ static int parse_argv(int argc, char *argv[]) {
         int c;
 
         while ((c = getopt_long(argc, argv, "ust:r:Vh", options, NULL)) >= 0)
-                switch(c) {
+                switch (c) {
                 case 'u':
                         arg_update = true;
                         break;
index 66ddf3a779db57a0e4aeea1f8dd021a71434c77d..a088c1727ce4b77a836cba081b71110ea4429c73 100644 (file)
@@ -345,7 +345,7 @@ static int query_device(QueryType query, sd_device* device) {
 
         assert(device);
 
-        switch(query) {
+        switch (query) {
         case QUERY_NAME: {
                 const char *node;