]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: minor formatting inconsistency cleanups 2724/head
authorVito Caputo <vito.caputo@coreos.com>
Tue, 23 Feb 2016 17:52:52 +0000 (09:52 -0800)
committerVito Caputo <vito.caputo@coreos.com>
Tue, 23 Feb 2016 22:20:34 +0000 (14:20 -0800)
46 files changed:
src/analyze/analyze.c
src/basic/MurmurHash2.c
src/basic/calendarspec.c
src/basic/cgroup-util.c
src/basic/io-util.h
src/basic/list.h
src/basic/log.h
src/basic/macro.h
src/basic/parse-util.c
src/basic/stdio-util.h
src/boot/efi/splash.c
src/core/load-fragment.c
src/delta/delta.c
src/journal-remote/browse.html
src/journal-remote/journal-upload.c
src/journal/journal-send.c
src/journal/journal-verify.c
src/journal/journald-server.c
src/journal/sd-journal.c
src/libsystemd-network/network-internal.c
src/libsystemd-network/sd-ipv4acd.c
src/libsystemd-network/sd-ipv4ll.c
src/libsystemd/sd-bus/bus-objects.c
src/libsystemd/sd-netlink/netlink-message.c
src/machine/machine.c
src/machine/machined-dbus.c
src/network/networkd-fdb.c
src/network/networkd-ipv4ll.c
src/network/networkd-link.c
src/network/networkd-netdev-tuntap.c
src/network/networkd-netdev-vxlan.c
src/nspawn/nspawn.c
src/resolve/resolved-conf.c
src/resolve/resolved-dns-packet.c
src/shared/bus-util.c
src/shared/conf-parser.h
src/shared/sleep-config.c
src/systemctl/systemctl.c
src/sysv-generator/sysv-generator.c
src/test/test-netlink-manual.c
src/test/test-path.c
src/test/test-unit-file.c
src/udev/mtd_probe/probe_smartmedia.c
src/udev/udev-builtin-input_id.c
src/udev/udevadm-monitor.c
src/udev/udevadm-test.c

index a84708478140c827766f648602a9dcb83fd702ed..6db8e406f860d62be4bb6d8727c3e884bbdb80a8 100644 (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,
index 2f4149dbe9de8d5e17df476fd8c44b0956e69535..90207939307242e248ed8601b09145aa24f657cd 100644 (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;
 
index b1f2a511f3e10a772fe8c6b0f8dc2f88003609d1..6e0bab9b940f0e05cf96b5e0b44a357a8ace1aaa 100644 (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)
index 6ef00d51df28e2da6d90fc5e7c5efe2fd120d412..56c1fcaab9b23a337da0f4f36ed0ec01c0a418ab 100644 (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;
 
index 142c940d92692f6a2257aeba0f5786f039e483d2..4684ed3bfc782919b71600521ba7a66f4b04043d 100644 (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;
index c68185f5878eaad93d4abba7bb9a1a6107d424cd..5962aa42113b5d425cd181241a7f17da9ef43439 100644 (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)                                  \
                         _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)                               \
                         _b->name##_next = _a;                           \
                         _a->name##_prev = _b;                           \
                 }                                                       \
-        } while(false)
+        } while (false)
 
 #define LIST_JUST_US(name,item)                                         \
         (!(item)->name##_prev && !(item)->name##_next)                  \
index 60ddead74cfad0082c2759fb80d259f6f5c8a56f..f9fb1742a1edb65b318d30524e36abf67aa2bab4 100644 (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 */
index 2695d0edb75ba436e645fc1f32786dde78e22bbd..ddf0968d1b07be99a2c755776d08e20d70cc3039 100644 (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
index a3cb81b040f09a5c29304821ca845dd09e70d44e..6c11b605a99854f931ab9b8e967fd8c556330760 100644 (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;
index 0a675571ff6c7c238153b591264bb6c0d5d92d98..bd1144b4c9f5610b608fcf7078a3e31cf9673306 100644 (file)
@@ -73,4 +73,4 @@ do {                                                                    \
                         assert_not_reached("Unknown format string argument."); \
                 }                                                       \
         }                                                               \
-} while(false)
+} while (false)
index b1cc2c0b729d07b58d1b86dc19f00a08576a13ea..c0ef7f64fecdfb737e9dc26af3355a76878556c4 100644 (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,
index 3eeb904d7e8c61b8130970353ea0e8d4f03a393d..e1bfdccbca0435759bf58eff186e5ec692bd9621 100644 (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;
                 }
index a54fc89de65eaaa4c26a7398585a5d8829c0a462..202a030c5447174770c8e033a84a3d73dee3c506 100644 (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);
index 3594f70c8728c3919fdda83d141783b728352ffb..32848c767387fb0d59775ada7fd0416d7ceb31d6 100644 (file)
                         entry = document.getElementById("tableentry");
 
                         var buf = "";
-                        for (var key in d){
+                        for (var key in d) {
                                 var data = d[key];
 
                                 if (data == null)
index 440563e7d3a56e151543d4ffedd38a37e42cc970..6e1c3bb9ef45bb78adcdbdb3b79760d415582c40 100644 (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,
index c7d670f4fff912430d0d4f32b7ab45cfbad19086..a79846146a3c9175a972f7e94564e778dbad893d 100644 (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
index 7a35776eaa483334fd92747ec8b3e83cdc4b1933..a1241c9bcf0a2efdf6a1303a7f7762161838384f 100644 (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;
index d5937bd013c88515b17ac1da4fc54f6f3daebb2b..2939322925f79244b0a61fa6f0d6e2b320642923 100644 (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);
index 3ba4981cd4c01553aea96eee86199adab40da15a..ac75e3931263328e4297b97f9db7fe534360c2c7 100644 (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;
index abf3b157d0fd809f43ef200e9c41f89f040513d4..cb7252bbeb90657252151151cf168c2992cf8937 100644 (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;
index 8a26cb877090ee08790160383ccf6d1644efc6a2..cc7436db6bee8db4385b4111a4aff6274cbafe19 100644 (file)
@@ -456,7 +456,7 @@ int sd_ipv4acd_set_callback(sd_ipv4acd *ll, sd_ipv4acd_callback_t cb, void *user
         return 0;
 }
 
-int sd_ipv4acd_set_address(sd_ipv4acd *ll, const struct in_addr *address){
+int sd_ipv4acd_set_address(sd_ipv4acd *ll, const struct in_addr *address) {
         assert_return(ll, -EINVAL);
         assert_return(address, -EINVAL);
         assert_return(ll->state == IPV4ACD_STATE_INIT, -EBUSY);
index aca393aa5e61178c756e646a21088f0be80b1f54..2a06418c53d50e1c0938aee7d2a10c188f76c98d 100644 (file)
@@ -181,7 +181,7 @@ int sd_ipv4ll_set_callback(sd_ipv4ll *ll, sd_ipv4ll_callback_t cb, void *userdat
         return 0;
 }
 
-int sd_ipv4ll_get_address(sd_ipv4ll *ll, struct in_addr *address){
+int sd_ipv4ll_get_address(sd_ipv4ll *ll, struct in_addr *address) {
         assert_return(ll, -EINVAL);
         assert_return(address, -EINVAL);
 
index 3c189b30ec5a5ac6dbcc29203dab147302ed4310..9bd07ffcabbac14d7b21b7de95959b88e4c65895 100644 (file)
@@ -145,7 +145,7 @@ static int add_enumerated_to_set(
                                 continue;
                         }
 
-                        if (!object_path_is_valid(*k)){
+                        if (!object_path_is_valid(*k)) {
                                 free(*k);
                                 r = -EINVAL;
                                 continue;
index 2ce50edc7e50baa56046550057e1bab0a4824e6c..3924300817835c54b87aa43e434d9327c128c547 100644 (file)
@@ -528,7 +528,7 @@ static int netlink_message_read_internal(sd_netlink_message *m, unsigned short t
 
         attribute = &m->containers[m->n_containers].attributes[type];
 
-        if(!attribute->offset)
+        if (!attribute->offset)
                 return -ENODATA;
 
         rta = (struct rtattr*)((uint8_t *) m->hdr + attribute->offset);
@@ -735,7 +735,7 @@ static int netlink_container_parse(sd_netlink_message *m,
         _cleanup_free_ struct netlink_attribute *attributes = NULL;
 
         attributes = new0(struct netlink_attribute, count);
-        if(!attributes)
+        if (!attributes)
                 return -ENOMEM;
 
         for (; RTA_OK(rta, rt_len); rta = RTA_NEXT(rta, rt_len)) {
index 7a7a1bb42b8551c5bd442d154e0cb86091504289..7d4270a8fffe350737f398e2ce3acf701c834270 100644 (file)
@@ -310,7 +310,7 @@ int machine_load(Machine *m) {
                 int *ni = NULL;
 
                 p = netif;
-                for(;;) {
+                for (;;) {
                         _cleanup_free_ char *word = NULL;
                         int ifi;
 
index b9330993304b78ec012740ddda3c73c9b241ddff..20894433e7d7f826935acd88a5d898e620f28723 100644 (file)
@@ -1212,7 +1212,7 @@ int match_properties_changed(sd_bus_message *message, void *userdata, sd_bus_err
         r = unit_name_from_dbus_path(path, &unit);
         if (r == -EINVAL) /* not for a unit */
                 return 0;
-        if (r < 0){
+        if (r < 0) {
                 log_oom();
                 return 0;
         }
index 1538caa204ddba5b8d2b5ce2916202f2fbf824ea..241f4862117d4e4f4064eda5ab9ee466037feb2f 100644 (file)
@@ -37,7 +37,7 @@ int fdb_entry_new_static(Network *const network,
         assert(network);
 
         /* search entry in hashmap first. */
-        if(section) {
+        if (section) {
                 fdb_entry = hashmap_get(network->fdb_entries_by_section, UINT_TO_PTR(section));
                 if (fdb_entry) {
                         *ret = fdb_entry;
@@ -141,10 +141,10 @@ int fdb_entry_configure(Link *const link, FdbEntry *const fdb_entry) {
 
 /* remove and FDB entry. */
 void fdb_entry_free(FdbEntry *fdb_entry) {
-        if(!fdb_entry)
+        if (!fdb_entry)
                 return;
 
-        if(fdb_entry->network) {
+        if (fdb_entry->network) {
                 LIST_REMOVE(static_fdb_entries, fdb_entry->network->static_fdb_entries,
                             fdb_entry);
 
index 949c75337cd449afcf649a74ae3fc78f5c6fe6f6..e05fd3eea7bbbb61b0dc0ddb996de094f339587f 100644 (file)
@@ -165,7 +165,7 @@ static int ipv4ll_address_claimed(sd_ipv4ll *ll, Link *link) {
         return 0;
 }
 
-static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata){
+static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
         Link *link = userdata;
         int r;
 
index a4652ba9c9a507186a972b740d1d8f3643fea35f..ff4bd76554f56c8d00065d581443d9896cf94880 100644 (file)
@@ -1031,7 +1031,7 @@ static int link_set_bridge_fdb(Link *const link) {
 
         LIST_FOREACH(static_fdb_entries, fdb_entry, link->network->static_fdb_entries) {
                 r = fdb_entry_configure(link, fdb_entry);
-                if(r < 0) {
+                if (r < 0) {
                         log_link_error_errno(link, r, "Failed to add MAC entry to static MAC table: %m");
                         break;
                 }
@@ -1836,7 +1836,7 @@ static int link_joined(Link *link) {
                 }
         }
 
-        if(link->network->bridge) {
+        if (link->network->bridge) {
                 r = link_set_bridge(link);
                 if (r < 0)
                         log_link_error_errno(link, r, "Could not set bridge message: %m");
index cdf443862d617d9485ef2416cba1d2a4e4ee97fa..32917fe6d5e44282d1b2eb6f3a72ce2a202fc400 100644 (file)
@@ -88,7 +88,7 @@ static int netdev_tuntap_add(NetDev *netdev, struct ifreq *ifr) {
 
         assert(t);
 
-        if(t->user_name) {
+        if (t->user_name) {
 
                 user = t->user_name;
 
@@ -127,7 +127,7 @@ static int netdev_create_tuntap(NetDev *netdev) {
         int r;
 
         r = netdev_fill_tuntap_message(netdev, &ifr);
-        if(r < 0)
+        if (r < 0)
                 return r;
 
         return netdev_tuntap_add(netdev, &ifr);
index eb9a2c06b338eff165812aeff1c7c3a72da69f2a..dabbd97c87da24f30aa897abb1942e942178777a 100644 (file)
@@ -54,13 +54,13 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
         if (r < 0)
                 return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_LINK attribute: %m");
 
-        if(v->ttl) {
+        if (v->ttl) {
                 r = sd_netlink_message_append_u8(m, IFLA_VXLAN_TTL, v->ttl);
                 if (r < 0)
                         return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_TTL attribute: %m");
         }
 
-        if(v->tos) {
+        if (v->tos) {
                 r = sd_netlink_message_append_u8(m, IFLA_VXLAN_TOS, v->tos);
                 if (r < 0)
                         return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_TOS attribute: %m");
@@ -86,7 +86,7 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
         if (r < 0)
                 return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_L3MISS attribute: %m");
 
-        if(v->fdb_ageing) {
+        if (v->fdb_ageing) {
                 r = sd_netlink_message_append_u32(m, IFLA_VXLAN_AGEING, v->fdb_ageing / USEC_PER_SEC);
                 if (r < 0)
                         return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_AGEING attribute: %m");
index ce3695eaf6604646ca94c7319ace21ca0d676b35..4851c439c97f94b4349df16185bb92350c5ae739 100644 (file)
@@ -561,7 +561,7 @@ static int parse_argv(int argc, char *argv[]) {
                 case ARG_CAPABILITY:
                 case ARG_DROP_CAPABILITY: {
                         p = optarg;
-                        for(;;) {
+                        for (;;) {
                                 _cleanup_free_ char *t = NULL;
 
                                 r = extract_first_word(&p, &t, ",", 0);
@@ -3618,7 +3618,7 @@ int main(int argc, char *argv[]) {
                         /* We failed to wait for the container, or the
                          * container exited abnormally */
                         goto finish;
-                else if (r > 0 || container_status == CONTAINER_TERMINATED){
+                else if (r > 0 || container_status == CONTAINER_TERMINATED) {
                         /* The container exited with a non-zero
                          * status, or with zero status and no reboot
                          * was requested. */
index bb93fbfda2d49e2ef382b320fc8c53f6bddd91f3..990dc03b60b1a2a6f813f487e1083984863824a3 100644 (file)
@@ -59,7 +59,7 @@ int manager_parse_dns_server_string_and_warn(Manager *m, DnsServerType type, con
         assert(m);
         assert(string);
 
-        for(;;) {
+        for (;;) {
                 _cleanup_free_ char *word = NULL;
 
                 r = extract_first_word(&string, &word, NULL, 0);
@@ -114,7 +114,7 @@ int manager_parse_search_domains_and_warn(Manager *m, const char *string) {
         assert(m);
         assert(string);
 
-        for(;;) {
+        for (;;) {
                 _cleanup_free_ char *word = NULL;
 
                 r = extract_first_word(&string, &word, NULL, EXTRACT_QUOTES);
index 64913da573be248c01d4d72d5845618277063746..b7907bb5114426235f914b0d953065a2e037ee20 100644 (file)
@@ -38,8 +38,8 @@ static void rewind_dns_packet(DnsPacketRewinder *rewinder) {
                 dns_packet_rewind(rewinder->packet, rewinder->saved_rindex);
 }
 
-#define INIT_REWINDER(rewinder, p) do { rewinder.packet = p; rewinder.saved_rindex = p->rindex; } while(0)
-#define CANCEL_REWINDER(rewinder) do { rewinder.packet = NULL; } while(0)
+#define INIT_REWINDER(rewinder, p) do { rewinder.packet = p; rewinder.saved_rindex = p->rindex; } while (0)
+#define CANCEL_REWINDER(rewinder) do { rewinder.packet = NULL; } while (0)
 
 int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
         DnsPacket *p;
index 0776311837e77e7ba44d229409148086ffdfe243..b102a79da8f8c7da5c14cada364bb45214402a73 100644 (file)
@@ -843,7 +843,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) {
                         if (r < 0)
                                 return r;
 
-                        while((r = sd_bus_message_read_basic(property, SD_BUS_TYPE_STRING, &str)) > 0) {
+                        while ((r = sd_bus_message_read_basic(property, SD_BUS_TYPE_STRING, &str)) > 0) {
                                 _cleanup_free_ char *escaped = NULL;
 
                                 if (first)
index a91c94c322eb8fb5c6844ba687b8e1a92c5c08a4..73fb1324134411b3dd3e5aad3d2df9245b8d12a0 100644 (file)
@@ -178,7 +178,7 @@ int config_parse_personality(const char *unit, const char *filename, unsigned li
                 assert(data);                                                  \
                                                                                \
                 xs = new0(type, 1);                                            \
-                if(!xs)                                                        \
+                if (!xs)                                                       \
                         return -ENOMEM;                                        \
                                                                                \
                 *xs = invalid;                                                 \
index a0aef66bc820bc3cac8e6fb95a2b5c1c3842d102..35aa60101fb033947609a29ebe36fc2787c40a44 100644 (file)
@@ -37,7 +37,7 @@
 #include "string-util.h"
 #include "strv.h"
 
-#define USE(x, y) do{ (x) = (y); (y) = NULL; } while(0)
+#define USE(x, y) do { (x) = (y); (y) = NULL; } while (0)
 
 int parse_sleep_config(const char *verb, char ***_modes, char ***_states) {
 
index 7774506a1ec284c2549ae92bd17639aef3ae39c3..b3060d46502cc2f52be6e597fa0722356beeb347 100644 (file)
@@ -1484,7 +1484,7 @@ static int list_dependencies_print(const char *name, int level, unsigned int bra
                 printf("%s", draw_special_char(last ? DRAW_TREE_RIGHT : DRAW_TREE_BRANCH));
         }
 
-        if (arg_full){
+        if (arg_full) {
                 printf("%s\n", name);
                 return 0;
         }
@@ -6550,7 +6550,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                         }
 
                         p = optarg;
-                        for(;;) {
+                        for (;;) {
                                 _cleanup_free_ char *type = NULL;
 
                                 r = extract_first_word(&p, &type, ",", 0);
@@ -6600,7 +6600,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                                         return log_oom();
                         } else {
                                 p = optarg;
-                                for(;;) {
+                                for (;;) {
                                         _cleanup_free_ char *prop = NULL;
 
                                         r = extract_first_word(&p, &prop, ",", 0);
@@ -6785,7 +6785,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
                         }
 
                         p = optarg;
-                        for(;;) {
+                        for (;;) {
                                 _cleanup_free_ char *s = NULL;
 
                                 r = extract_first_word(&p, &s, ",", 0);
index b5925a47dc9bf03f2e326d5806dc501a6982eadb..59e1a3e92199e9f00a865cf486d3d1443816241b 100644 (file)
@@ -864,7 +864,7 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
                                 }
 
                                 service = hashmap_get(all_services, name);
-                                if (!service){
+                                if (!service) {
                                         log_debug("Ignoring %s symlink in %s, not generating %s.", de->d_name, rcnd_table[i].path, name);
                                         continue;
                                 }
index 79ff6ae74db6e7099507ce256b54fb507b1143be..bc6dd0926c12220923a3c4ca11be9ada1f98f498 100644 (file)
@@ -68,10 +68,10 @@ static int test_tunnel_configure(sd_netlink *rtnl) {
 
         /* skip test if module cannot be loaded */
         r = load_module("ipip");
-        if(r < 0)
+        if (r < 0)
                 return EXIT_TEST_SKIP;
 
-        if(getuid() != 0)
+        if (getuid() != 0)
                 return EXIT_TEST_SKIP;
 
         /* IPIP tunnel */
@@ -99,7 +99,7 @@ static int test_tunnel_configure(sd_netlink *rtnl) {
         assert_se((m = sd_netlink_message_unref(m)) == NULL);
 
         r = load_module("sit");
-        if(r < 0)
+        if (r < 0)
                 return EXIT_TEST_SKIP;
 
         /* sit */
index 7a3b145414900b6740417c2a4a67d24b1fbe5a33..1e704a03dc1d8b4f1a5a1d77afdd898ad6ed0bba 100644 (file)
@@ -93,7 +93,7 @@ static void check_stop_unlink(Manager *m, Unit *unit, const char *test_path, con
 
         ts = now(CLOCK_MONOTONIC);
         /* We process events until the service related to the path has been successfully started */
-        while(service->result != SERVICE_SUCCESS || service->state != SERVICE_START) {
+        while (service->result != SERVICE_SUCCESS || service->state != SERVICE_START) {
                 usec_t n;
                 int r;
 
index b0c343590d86d21a836bcabc1024bb23b90dc1d5..cc6c61ba634cd3d632ac374e8392e9c14e428a76 100644 (file)
@@ -606,7 +606,7 @@ static void test_install_printf(void) {
                 } else assert_se(t == NULL);                            \
                 strcpy(i.name, d1);                                     \
                 strcpy(i.path, d2);                                     \
-        } while(false)
+        } while (false)
 
         expect(i, "%n", "name.service");
         expect(i, "%N", "name");
index 6a6c5522a765365cefac3f9acad75d0c8ba537d2..2a7ba17637bb59ffe8f77b2b8f20567ee337d014 100644 (file)
@@ -73,7 +73,7 @@ void probe_smart_media(int mtd_fd, mtd_info_t* info)
         for (offset = 0 ; offset < block_size * spare_count ;
                                                 offset += sector_size) {
                 lseek(mtd_fd, SEEK_SET, offset);
-                if (read(mtd_fd, cis_buffer, SM_SECTOR_SIZE) == SM_SECTOR_SIZE){
+                if (read(mtd_fd, cis_buffer, SM_SECTOR_SIZE) == SM_SECTOR_SIZE) {
                         cis_found = 1;
                         break;
                 }
index 3a3d8a1770038ae11316c2ec845e21c031311c85..51a55cdbc4b6abc3c054b807c2bc898fb11dc43c 100644 (file)
@@ -177,7 +177,7 @@ static bool test_pointers(struct udev_device *dev,
         has_mt_coordinates = test_bit(ABS_MT_POSITION_X, bitmask_abs) && test_bit(ABS_MT_POSITION_Y, bitmask_abs);
 
         /* unset has_mt_coordinates if devices claims to have all abs axis */
-        if(has_mt_coordinates && test_bit(ABS_MT_SLOT, bitmask_abs) && test_bit(ABS_MT_SLOT - 1, bitmask_abs))
+        if (has_mt_coordinates && test_bit(ABS_MT_SLOT, bitmask_abs) && test_bit(ABS_MT_SLOT - 1, bitmask_abs))
                 has_mt_coordinates = false;
         is_direct = test_bit(INPUT_PROP_DIRECT, bitmask_props);
         has_touch = test_bit(BTN_TOUCH, bitmask_key);
index f9cb5e63a2497e7e91aa62de382fb2898938feeb..b5f7f0d512df7e6de94120b8a36561bdcc8a01a8 100644 (file)
@@ -100,7 +100,7 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) {
         udev_list_init(udev, &subsystem_match_list, true);
         udev_list_init(udev, &tag_match_list, true);
 
-        while((c = getopt_long(argc, argv, "pekus:t:h", options, NULL)) >= 0)
+        while ((c = getopt_long(argc, argv, "pekus:t:h", options, NULL)) >= 0)
                 switch (c) {
                 case 'p':
                 case 'e':
index ff427cf29217e125d96b0f9c3bd330847d823ec4..702dbe528299234f178b8f18a8efe460280be9e8 100644 (file)
@@ -61,7 +61,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
 
         log_debug("version %s", VERSION);
 
-        while((c = getopt_long(argc, argv, "a:N:h", options, NULL)) >= 0)
+        while ((c = getopt_long(argc, argv, "a:N:h", options, NULL)) >= 0)
                 switch (c) {
                 case 'a':
                         action = optarg;