]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #30616 from dtardon/docbook-valid-2
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Dec 2023 11:00:23 +0000 (20:00 +0900)
committerGitHub <noreply@github.com>
Mon, 25 Dec 2023 11:00:23 +0000 (20:00 +0900)
DocBook validation fixes (part 2)

70 files changed:
man/cgroup-sandboxing.xml
man/crypttab.xml
man/sd_bus_message_append.xml
man/systemctl.xml
man/systemd-storagetm.service.xml
man/systemd.network.xml
man/systemd.unit.xml
man/udevadm.xml
man/veritytab.xml
src/analyze/analyze-security.c
src/basic/alloc-util.h
src/basic/cgroup-util.h
src/basic/env-file.c
src/basic/env-util.c
src/basic/path-util.h
src/basic/socket-util.c
src/boot/bootctl.c
src/core/dbus-job.c
src/core/namespace.c
src/core/path.c
src/core/service.c
src/core/unit.c
src/coredump/coredump.c
src/cryptenroll/cryptenroll-tpm2.c
src/cryptenroll/cryptenroll.c
src/delta/delta.c
src/dissect/dissect.c
src/firstboot/firstboot.c
src/home/user-record-sign.c
src/import/qcow2-util.c
src/journal/journald-context.c
src/libsystemd-network/dhcp-option.c
src/libsystemd/sd-bus/bus-creds.c
src/libsystemd/sd-bus/bus-objects.c
src/libsystemd/sd-daemon/sd-daemon.c
src/libsystemd/sd-device/sd-device.c
src/libsystemd/sd-event/sd-event.c
src/machine/machinectl.c
src/network/networkd-dhcp-server.c
src/nspawn/nspawn-bind-user.c
src/nspawn/nspawn-oci.c
src/nspawn/nspawn.c
src/resolve/resolved-dns-transaction.c
src/shared/bitmap.c
src/shared/compare-operator.c
src/shared/cryptsetup-fido2.c
src/shared/dissect-image.c
src/shared/fdset.c
src/shared/firewall-util.h
src/shared/format-table.c
src/shared/fstab-util.c
src/shared/hwdb-util.c
src/shared/install.c
src/shared/json.c
src/shared/libfido2-util.c
src/shared/loopback-setup.c
src/shared/mount-setup.c
src/shared/rm-rf.c
src/shared/varlink-idl.c
src/shutdown/detach-dm.c
src/shutdown/detach-md.c
src/sysext/sysext.c
src/sysv-generator/sysv-generator.c
src/test/test-bus-util.c
src/test/test-capability.c
src/test/test-macro.c
src/test/test-mempool.c
src/test/test-mountpoint-util.c
src/test/test-tpm2.c
src/udev/dmi_memory_id/dmi_memory_id.c

index c9e068f88796f6021d6bddeef5f17ca04fa8bb64..6aa62df536722f20af9e79554255c7b8561ca7dc 100644 (file)
@@ -12,6 +12,6 @@
   in the service unit, as it applies to the whole control group.</para>
 
   <para id="plural">These options cannot be bypassed by prefixing <literal>+</literal> to the executable path
-  in the service unit, as it applies to the whole control group.</para>
+  in the service unit, as they apply to the whole control group.</para>
 
 </refsect1>
index 5e67d44cb3a2093d07f13ef3fdbbf5e31dad8deb..175e169fbc71c5945c4031e5e66994f5841b98cf 100644 (file)
         <citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
         This option implies <option>plain</option>.</para>
 
-        <para>WARNING: Using the <option>swap</option> option will
-        destroy the contents of the named partition during every boot,
-        so make sure the underlying block device is specified
-        correctly.</para>
+        <warning>
+          <para>Using the <option>swap</option> option will
+          destroy the contents of the named partition during every boot,
+          so make sure the underlying block device is specified
+          correctly.</para>
+        </warning>
 
         <xi:include href="version-info.xml" xpointer="v186"/></listitem>
       </varlistentry>
         <literal>btrfs</literal>. If no argument is specified defaults to <literal>ext4</literal>. This
         option implies <option>plain</option>.</para>
 
-        <para>WARNING: Using the <option>tmp</option> option will destroy the contents of the named partition
-        during every boot, so make sure the underlying block device is specified correctly.</para>
+        <warning>
+          <para>Using the <option>tmp</option> option will destroy the contents of the named partition
+          during every boot, so make sure the underlying block device is specified correctly.</para>
+        </warning>
 
         <xi:include href="version-info.xml" xpointer="v186"/></listitem>
       </varlistentry>
index 3ed70b453eb2aa2a4d65f9acc65fa40c2070bd6d..a029edd1b8989f2a371a170898bd1cdcc3c9c81a 100644 (file)
@@ -95,7 +95,7 @@
       <title>Item type specifiers</title>
 
       <tgroup cols='5'>
-        <xi:include href="sd_bus_message_append_basic.xml" xpointer="xpointer(//table[@id='format-specifiers'])//colspec" />
+        <xi:include href="sd_bus_message_append_basic.xml" xpointer="xpointer(//table[@id='format-specifiers']//colspec)" />
         <xi:include href="sd_bus_message_append_basic.xml" xpointer="xpointer(//table[@id='format-specifiers']//thead)" />
 
         <tbody>
index e0267df778391b7d02d8011868876bbc59a3178d..b22c1b19541c7cf7ffe98d86ef56f626ff369b82 100644 (file)
@@ -2478,11 +2478,15 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
           processes will be killed forcibly and all file systems are unmounted or remounted read-only. This is hence a
           drastic but relatively safe option to request an immediate reboot. If <option>--force</option> is specified
           twice for these operations (with the exception of <command>kexec</command>), they will be executed
-          immediately, without terminating any processes or unmounting any file systems. Warning: specifying
-          <option>--force</option> twice with any of these operations might result in data loss. Note that when
-          <option>--force</option> is specified twice the selected operation is executed by
-          <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
-          succeed even when the system manager has crashed.</para>
+          immediately, without terminating any processes or unmounting any file systems.</para>
+
+          <warning>
+            <para>Specifying
+            <option>--force</option> twice with any of these operations might result in data loss. Note that when
+            <option>--force</option> is specified twice the selected operation is executed by
+            <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
+            succeed even when the system manager has crashed.</para>
+          </warning>
         </listitem>
       </varlistentry>
 
index 0ca1cbd8a5c2d1a5c633920d015784341ed26193..728b3ae37a0b652a61e6f2a64977191790fa353b 100644 (file)
     NVMe-TCP mass storage devices. Its primary use-case is to be invoked by the
     <filename>storage-target-mode.target</filename> unit that can be booted into.</para>
 
-    <para>Warning: the NVMe disks are currently exposed without authentication or encryption, in read/write
-    mode. This means network peers may read from and write to the device without any restrictions. This
-    functionality should hence only be used in a local setup.</para>
+    <warning>
+      <para>The NVMe disks are currently exposed without authentication or encryption, in read/write
+      mode. This means network peers may read from and write to the device without any restrictions. This
+      functionality should hence only be used in a local setup.</para>
+    </warning>
 
     <para>Note that to function properly networking must be configured too. The recommended mechanism to boot
     into a storage target mode is by adding <literal>rd.systemd.unit=storage-target-mode.target
index ea558c4b4ef58bb8a436e6bee8269090a81cdb3e..1f30cc13b30b7e1796f8134c56856b41de0a5ec3 100644 (file)
@@ -1342,13 +1342,15 @@ Table=1234</programlisting></para>
           Fallback Peer Labeling</ulink> rules. They will be removed when the interface is
           deconfigured. Failures to manage the labels will be ignored.</para>
 
-          <para>Warning: Once labeling is enabled for network traffic, a lot of LSM access control points in
-          Linux networking stack go from dormant to active. Care should be taken to avoid getting into a
-          situation where for example remote connectivity is broken, when the security policy hasn't been
-          updated to consider LSM per-packet access controls and no rules would allow any network
-          traffic. Also note that additional configuration with <citerefentry
-          project='man-pages'><refentrytitle>netlabelctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-          is needed.</para>
+          <warning>
+            <para>Once labeling is enabled for network traffic, a lot of LSM access control points in
+            Linux networking stack go from dormant to active. Care should be taken to avoid getting into a
+            situation where for example remote connectivity is broken, when the security policy hasn't been
+            updated to consider LSM per-packet access controls and no rules would allow any network
+            traffic. Also note that additional configuration with <citerefentry
+            project='man-pages'><refentrytitle>netlabelctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+            is needed.</para>
+          </warning>
 
           <para>Example:
           <programlisting>[Address]
index 41f1a0af4ac6a3a90ea1d90009b2258e591a6af3..11154bdc76f58c842b150ebfe63ff6bc1ce37729 100644 (file)
   </refnamediv>
 
   <refsynopsisdiv>
-    <para><filename><replaceable>service</replaceable>.service</filename>,
-    <filename><replaceable>socket</replaceable>.socket</filename>,
-    <filename><replaceable>device</replaceable>.device</filename>,
-    <filename><replaceable>mount</replaceable>.mount</filename>,
-    <filename><replaceable>automount</replaceable>.automount</filename>,
-    <filename><replaceable>swap</replaceable>.swap</filename>,
-    <filename><replaceable>target</replaceable>.target</filename>,
-    <filename><replaceable>path</replaceable>.path</filename>,
-    <filename><replaceable>timer</replaceable>.timer</filename>,
-    <filename><replaceable>slice</replaceable>.slice</filename>,
-    <filename><replaceable>scope</replaceable>.scope</filename></para>
+    <para><simplelist type="inline">
+      <member><filename><replaceable>service</replaceable>.service</filename></member>
+      <member><filename><replaceable>socket</replaceable>.socket</filename></member>
+      <member><filename><replaceable>device</replaceable>.device</filename></member>
+      <member><filename><replaceable>mount</replaceable>.mount</filename></member>
+      <member><filename><replaceable>automount</replaceable>.automount</filename></member>
+      <member><filename><replaceable>swap</replaceable>.swap</filename></member>
+      <member><filename><replaceable>target</replaceable>.target</filename></member>
+      <member><filename><replaceable>path</replaceable>.path</filename></member>
+      <member><filename><replaceable>timer</replaceable>.timer</filename></member>
+      <member><filename><replaceable>slice</replaceable>.slice</filename></member>
+      <member><filename><replaceable>scope</replaceable>.scope</filename></member>
+    </simplelist></para>
 
     <refsect2>
       <title>System Unit Search Path</title>
index 9932f14b9f59c6748913971918f8f6516e146ee3..b254a7f249c0915be73ee81966a65eef73cb676c 100644 (file)
             <para>Typically, it is essential that applications which intend to use such a match, make
             sure a suitable udev rule is installed that sets at least one property on devices that
             shall be matched. See also Initialized Devices section below for more details.</para>
-            <para>WARNING: <option>--initialized-nomatch</option> can potentially save a significant
-            amount of time compared to re-triggering all devices in the system and e.g. can be used to
-            optimize boot time. However, this is not safe to be used in a boot sequence in general.
-            Especially, when udev rules for a device depend on its parent devices (e.g.
-            <literal>ATTRS</literal> or <literal>IMPORT{parent}</literal> keys, see
-            <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
-            for more details), the final state of the device becomes easily unstable with this option.
-            </para>
+            <warning>
+              <para><option>--initialized-nomatch</option> can potentially save a significant
+              amount of time compared to re-triggering all devices in the system and e.g. can be used to
+              optimize boot time. However, this is not safe to be used in a boot sequence in general.
+              Especially, when udev rules for a device depend on its parent devices (e.g.
+              <literal>ATTRS</literal> or <literal>IMPORT{parent}</literal> keys, see
+              <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+              for more details), the final state of the device becomes easily unstable with this option.
+              </para>
+            </warning>
 
             <xi:include href="version-info.xml" xpointer="v251"/>
           </listitem>
index e58edf1a50619c0f24cc751491662495d5635121..ee88528775a56889cabf53b00e19c0e961ba06cb 100644 (file)
@@ -41,19 +41,19 @@ This is based on crypttab(5).
     verity protected block device. Fields are delimited by
     white space.</para>
 
-    <para>Each line is in the form<programlisting><replaceable>volume-name</replaceable> <replaceable>data-device</replaceable> <replaceable>hash-device</replaceable> <replaceable>roothash</replaceable> <replaceable>options</replaceable></programlisting>
+    <para>Each line is in the form<programlisting><replaceable>volume-name</replaceable> <replaceable>data-device</replaceable> <replaceable>hash-device</replaceable> <replaceable>roothash</replaceable> <optional><replaceable>options</replaceable></optional></programlisting>
     The first four fields are mandatory, the remaining one is optional.</para>
 
     <para>The first field contains the name of the resulting verity volume; its block device is set up
     below <filename>/dev/mapper/</filename>.</para>
 
     <para>The second field contains a path to the underlying block data device, or a specification of a block device via
-    <literal>UUID=</literal> followed by the UUID.</para>
+    <varname>UUID=</varname> followed by the <replaceable>UUID</replaceable>.</para>
 
     <para>The third field contains a path to the underlying block hash device, or a specification of a block device via
-    <literal>UUID=</literal> followed by the UUID.</para>
+    <varname>UUID=</varname> followed by the <replaceable>UUID</replaceable>.</para>
 
-    <para>The fourth field is the <literal>roothash</literal> in hexadecimal.</para>
+    <para>The fourth field is the <replaceable>roothash</replaceable> in hexadecimal.</para>
 
     <para>The fifth field, if present, is a comma-delimited list of options. The following options are
     recognized:</para>
@@ -71,7 +71,7 @@ This is based on crypttab(5).
       <varlistentry>
         <term><option>format=<replaceable>NUMBER</replaceable></option></term>
 
-        <listitem><para>Specifies the hash version type. Format type 0 is original Chrome OS version. Format type 1 is
+        <listitem><para>Specifies the hash version type. Format type <literal>0</literal> is original Chrome OS version. Format type <literal>1</literal> is
         modern version.</para>
 
         <xi:include href="version-info.xml" xpointer="v254"/></listitem>
@@ -117,7 +117,7 @@ This is based on crypttab(5).
         <term><option>salt=<replaceable>HEX</replaceable></option></term>
 
         <listitem><para>Salt used for format or verification. Format is a hexadecimal string; 256 bytes long maximum;
-        <literal>-</literal>is the special value for empty.</para>
+        <literal>-</literal> is the special value for empty.</para>
 
         <xi:include href="version-info.xml" xpointer="v254"/></listitem>
       </varlistentry>
@@ -125,8 +125,8 @@ This is based on crypttab(5).
       <varlistentry>
         <term><option>uuid=<replaceable>UUID</replaceable></option></term>
 
-        <listitem><para>Use the provided UUID for format command instead of generating new one. The UUID must be
-        provided in standard UUID format, e.g. 12345678-1234-1234-1234-123456789abc.</para>
+        <listitem><para>Use the provided <replaceable>UUID</replaceable> for format command instead of generating new one. The <replaceable>UUID</replaceable> must be
+        provided in standard <acronym>UUID</acronym> format, e.g. <literal>12345678-1234-1234-1234-123456789abc</literal>.</para>
 
         <xi:include href="version-info.xml" xpointer="v254"/></listitem>
       </varlistentry>
@@ -137,9 +137,9 @@ This is based on crypttab(5).
         <term><option>panic-on-corruption</option></term>
 
         <listitem><para>Defines what to do if a data verity problem is detected (data corruption). Without these
-        options kernel fails the IO operation with I/O error. With <literal>--ignore-corruption</literal> option the
-        corruption is only logged. With <literal>--restart-on-corruption</literal> or
-        <literal>--panic-on-corruption</literal> the kernel is restarted (panicked) immediately.
+        options kernel fails the <acronym>IO</acronym> operation with <acronym>I/O</acronym> error. With <option>--ignore-corruption</option> option the
+        corruption is only logged. With <option>--restart-on-corruption</option> or
+        <option>--panic-on-corruption</option> the kernel is restarted (panicked) immediately.
 
         (You have to provide way how to avoid restart loops.)</para>
 
@@ -150,10 +150,11 @@ This is based on crypttab(5).
         <term><option>ignore-zero-blocks</option></term>
 
         <listitem><para>Instruct kernel to not verify blocks that are expected to contain zeroes and always directly
-        return zeroes instead.
+        return zeroes instead.</para>
 
-        WARNING: Use this option only in very specific cases. This option is available since Linux kernel version 4.5.
-        </para>
+        <warning>
+          <para>Use this option only in very specific cases. This option is available since Linux kernel version 4.5.</para>
+        </warning>
 
         <xi:include href="version-info.xml" xpointer="v248"/></listitem>
       </varlistentry>
@@ -162,11 +163,12 @@ This is based on crypttab(5).
         <term><option>check-at-most-once</option></term>
 
         <listitem><para>Instruct kernel to verify blocks only the first time they are read from the data device, rather
-        than every time.
+        than every time.</para>
 
-        WARNING: It provides a reduced level of security because only offline tampering of the data device's content
-        will be detected, not online tampering. This option is available since Linux kernel version 4.17.
-        </para>
+        <warning>
+          <para>It provides a reduced level of security because only offline tampering of the data device's content
+          will be detected, not online tampering. This option is available since Linux kernel version 4.17.</para>
+        </warning>
 
         <xi:include href="version-info.xml" xpointer="v248"/></listitem>
       </varlistentry>
@@ -183,7 +185,7 @@ This is based on crypttab(5).
       <varlistentry>
         <term><option>fec-device=<replaceable>PATH</replaceable></option></term>
 
-        <listitem><para>Use forward error correction (FEC) to recover from corruption if hash verification fails. Use
+        <listitem><para>Use forward error correction (<acronym>FEC</acronym>) to recover from corruption if hash verification fails. Use
         encoding data from the specified device. The fec device argument can be block device or file image. For format,
         if fec device path doesn't exist, it will be created as file. Note: block sizes for data and hash devices must
         match. Also, if the verity data_device is encrypted the fec_device should be too.</para>
@@ -194,7 +196,7 @@ This is based on crypttab(5).
       <varlistentry>
         <term><option>fec-offset=<replaceable>BYTES</replaceable></option></term>
 
-        <listitem><para>This is the offset, in bytes, from the start of the FEC device to the beginning of the encoding
+        <listitem><para>This is the offset, in bytes, from the start of the <acronym>FEC</acronym> device to the beginning of the encoding
         data. (Aligned on 512 bytes.)</para>
 
         <xi:include href="version-info.xml" xpointer="v254"/></listitem>
index 5f1b5e69705e2df3221c3276e6390b1f2d672ea5..030b206f1e0276c12e6b6c40097ce9540615a117 100644 (file)
@@ -1651,7 +1651,7 @@ static uint64_t access_weight(const struct security_assessor *a, JsonVariant *po
         assert(a);
 
         val = security_assessor_find_in_policy(a, policy, "weight");
-        if  (val) {
+        if (val) {
                 if (json_variant_is_unsigned(val))
                         return json_variant_unsigned(val);
                 log_debug("JSON field 'weight' of policy for %s is not an unsigned integer, ignoring.", a->id);
@@ -1666,7 +1666,7 @@ static uint64_t access_range(const struct security_assessor *a, JsonVariant *pol
         assert(a);
 
         val = security_assessor_find_in_policy(a, policy, "range");
-        if  (val) {
+        if (val) {
                 if (json_variant_is_unsigned(val))
                         return json_variant_unsigned(val);
                 log_debug("JSON field 'range' of policy for %s is not an unsigned integer, ignoring.", a->id);
@@ -1681,7 +1681,7 @@ static const char *access_description_na(const struct security_assessor *a, Json
         assert(a);
 
         val = security_assessor_find_in_policy(a, policy, "description_na");
-        if  (val) {
+        if (val) {
                 if (json_variant_is_string(val))
                         return json_variant_string(val);
                 log_debug("JSON field 'description_na' of policy for %s is not a string, ignoring.", a->id);
@@ -1696,7 +1696,7 @@ static const char *access_description_good(const struct security_assessor *a, Js
         assert(a);
 
         val = security_assessor_find_in_policy(a, policy, "description_good");
-        if  (val) {
+        if (val) {
                 if (json_variant_is_string(val))
                         return json_variant_string(val);
                 log_debug("JSON field 'description_good' of policy for %s is not a string, ignoring.", a->id);
@@ -1711,7 +1711,7 @@ static const char *access_description_bad(const struct security_assessor *a, Jso
         assert(a);
 
         val = security_assessor_find_in_policy(a, policy, "description_bad");
-        if  (val) {
+        if (val) {
                 if (json_variant_is_string(val))
                         return json_variant_string(val);
                 log_debug("JSON field 'description_bad' of policy for %s is not a string, ignoring.", a->id);
index 4f86334d7d425ce2f29d57d05075e0b7e949569f..5fbfff0af41663d3d0cf69c5281ff27396a52461 100644 (file)
@@ -112,7 +112,7 @@ static inline bool size_multiply_overflow(size_t size, size_t need) {
         return _unlikely_(need != 0 && size > (SIZE_MAX / need));
 }
 
-_malloc_  _alloc_(1, 2) static inline void *malloc_multiply(size_t size, size_t need) {
+_malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t size, size_t need) {
         if (size_multiply_overflow(size, need))
                 return NULL;
 
index 6ab14c753d5f730720a321761fcb2b6051028fc8..be97258d1688f5ad7023d90a7f37b1c2a54eea7e 100644 (file)
@@ -215,7 +215,7 @@ int cg_is_delegated_fd(int fd);
 
 int cg_has_coredump_receive(const char *path);
 
-typedef enum  {
+typedef enum {
         CG_KEY_MODE_GRACEFUL = 1 << 0,
 } CGroupKeyMode;
 
index c2cbff4d843c6250eb90ff690c6f81141f190a9a..2fff98f8fb462a0e2e18c64808a2b32a97a9c423 100644 (file)
@@ -125,7 +125,7 @@ static int parse_env_file_internal(
                                 state = VALUE;
 
                                 if (!GREEDY_REALLOC(value, n_value+2))
-                                        return  -ENOMEM;
+                                        return -ENOMEM;
 
                                 value[n_value++] = c;
                         }
index 7ac47732ba823e825493df44f58edf93fc051fcc..23a128bfd136b02ffc3630c20f10ed63f3c7e4fc 100644 (file)
@@ -683,7 +683,7 @@ int replace_env_full(
         pu = ret_unset_variables ? &unset_variables : NULL;
         pb = ret_bad_variables ? &bad_variables : NULL;
 
-        for (e = format, i = 0; *e && i < n; e ++, i ++)
+        for (e = format, i = 0; *e && i < n; e++, i++)
                 switch (state) {
 
                 case WORD:
index 6d943e967f27d044a26cfb5d39c69640e33dcc4d..39b6714525e95d20170a32ae2c15760dcb752d25 100644 (file)
@@ -156,7 +156,7 @@ int fsck_exists_for_fstype(const char *fstype);
                 char *_p, *_n;                                          \
                 size_t _l;                                              \
                 while (_path[0] == '/' && _path[1] == '/')              \
-                        _path ++;                                       \
+                        _path++;                                        \
                 if (isempty(_root))                                     \
                         _ret = _path;                                   \
                 else {                                                  \
index 4f28d16b5e4b275ae2e66775195e7cbe1f2d1d37..86472c88474f6de43ab1e9037b3991bbca6d8a68 100644 (file)
@@ -547,7 +547,7 @@ int sockaddr_pretty(
                         } else {
                                 if (path[path_len - 1] == '\0')
                                         /* We expect a terminating NUL and don't print it */
-                                        path_len --;
+                                        path_len--;
 
                                 p = cescape_length(path, path_len);
                         }
index 4614ca17801c2fcdb1724cfe91cb4d8dfa75603b..f608e8cc8e0a917dc31e90b388c1e25cf9e7d995 100644 (file)
@@ -324,7 +324,7 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case 'R':
-                        arg_print_root_device ++;
+                        arg_print_root_device++;
                         break;
 
                 case ARG_NO_VARIABLES:
index c88d8c2dd5fc3eec11be3581095302df5c120b2e..56ad88570f11cda3e2a5bfb251ecbb7fa472ce65 100644 (file)
@@ -87,7 +87,7 @@ int bus_job_method_get_waiting_jobs(sd_bus_message *message, void *userdata, sd_
         if (r < 0)
                 return r;
 
-        for (int i = 0; i < n; i ++) {
+        for (int i = 0; i < n; i++) {
                 _cleanup_free_ char *unit_path = NULL, *job_path = NULL;
 
                 job_path = job_dbus_path(list[i]);
index 50d7b05aa094f9cd9ab1c8601ffc50ae2b00bcf7..df6d0b4485c76ea52402a8bce7d6f6fa8a5efcf0 100644 (file)
@@ -1469,7 +1469,7 @@ static int follow_symlink(
 
         mount_entry_consume_prefix(m, TAKE_PTR(target));
 
-        m->n_followed ++;
+        m->n_followed++;
 
         return 0;
 }
@@ -2625,7 +2625,7 @@ int bind_mount_add(BindMount **b, size_t *n, const BindMount *item) {
 
         *b = c;
 
-        c[(*n) ++] = (BindMount) {
+        c[(*n)++] = (BindMount) {
                 .source = TAKE_PTR(s),
                 .destination = TAKE_PTR(d),
                 .read_only = item->read_only,
@@ -2694,7 +2694,7 @@ int mount_image_add(MountImage **m, size_t *n, const MountImage *item) {
 
         *m = c;
 
-        c[(*n) ++] = (MountImage) {
+        c[(*n)++] = (MountImage) {
                 .source = TAKE_PTR(s),
                 .destination = TAKE_PTR(d),
                 .mount_options = TAKE_PTR(options),
@@ -2745,7 +2745,7 @@ int temporary_filesystem_add(
 
         *t = c;
 
-        c[(*n) ++] = (TemporaryFileSystem) {
+        c[(*n)++] = (TemporaryFileSystem) {
                 .path = TAKE_PTR(p),
                 .options = TAKE_PTR(o),
         };
index 471d159d81de0e1a05af16eee033524d3abb2f57..f6b5683467a13bac47c6aadee67ea3c247334657 100644 (file)
@@ -90,7 +90,7 @@ int path_spec_watch(PathSpec *s, sd_event_io_handler_t handler) {
                 /* If this is a symlink watch both the symlink inode and where it points to. If the inode is
                  * not a symlink both calls will install the same watch, which is redundant and doesn't
                  * hurt. */
-                for (int follow_symlink = 0; follow_symlink < 2; follow_symlink ++) {
+                for (int follow_symlink = 0; follow_symlink < 2; follow_symlink++) {
                         uint32_t f = flags;
 
                         SET_FLAG(f, IN_DONT_FOLLOW, !follow_symlink);
index 7bd4e99b11fb64f97cb873debcb41204e09dc0d7..c6251079c6142cb03d416f5be07d171f97ec7dea 100644 (file)
@@ -2529,7 +2529,7 @@ static void service_enter_restart(Service *s) {
         /* Count the jobs we enqueue for restarting. This counter is maintained as long as the unit isn't
          * fully stopped, i.e. as long as it remains up or remains in auto-start states. The user can reset
          * the counter explicitly however via the usual "systemctl reset-failure" logic. */
-        s->n_restarts ++;
+        s->n_restarts++;
         s->flush_n_restarts = false;
 
         s->notify_access_override = _NOTIFY_ACCESS_INVALID;
index 0772a67001c5932b01f9b102bd5f9d0660c925ce..c5d84837912663a7eb5cd54dd335be6f56f14dd4 100644 (file)
@@ -2314,7 +2314,7 @@ void unit_start_on_failure(
                         log_unit_warning_errno(
                                         u, r, "Failed to enqueue %s job, ignoring: %s",
                                         dependency_name, bus_error_message(&error, r));
-                n_jobs ++;
+                n_jobs++;
         }
 
         if (n_jobs >= 0)
index 32c17664fd8604f0e78eb3f1cdf3918cd17a490c..2b6222b308e03de259e0d19f74582cd0445347b8 100644 (file)
@@ -1479,7 +1479,7 @@ static int forward_coredump_to_container(Context *context) {
                         char buf[DECIMAL_STR_MAX(pid_t)];
                         const char *t = context->meta[i];
 
-                        switch(i) {
+                        switch (i) {
 
                         case META_ARGV_PID:
                                 xsprintf(buf, PID_FMT, ucred.pid);
index 653ad4452a1810ecad59609f47ede1f86fe1f690..0268d8f7721d83bdf02e6573f263fa5dd7fd858f 100644 (file)
@@ -25,7 +25,7 @@ static int search_policy_hash(
         if (hash_size == 0)
                 return 0;
 
-        for (int token = 0; token < sym_crypt_token_max(CRYPT_LUKS2); token ++) {
+        for (int token = 0; token < sym_crypt_token_max(CRYPT_LUKS2); token++) {
                 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
                 _cleanup_free_ void *thash = NULL;
                 size_t thash_size = 0;
index 5a7f7c3bff71c762d359655bfafb239af61efd80..687b908f060c97f65e108544c322430fa6e69d8c 100644 (file)
@@ -571,7 +571,7 @@ static int check_for_homed(struct crypt_device *cd) {
         /* Politely refuse operating on homed volumes. The enrolled tokens for the user record and the LUKS2
          * volume should not get out of sync. */
 
-        for (int token = 0; token < crypt_token_max(CRYPT_LUKS2); token ++) {
+        for (int token = 0; token < crypt_token_max(CRYPT_LUKS2); token++) {
                 r = cryptsetup_get_token_as_json(cd, token, "systemd-homed", NULL);
                 if (IN_SET(r, -ENOENT, -EINVAL, -EMEDIUMTYPE))
                         continue;
index 3337b7f081ae728a0c22e927d9b5251fcc0ee724..3433250549bbf5ccd4e446c12421b1082d1563c0 100644 (file)
@@ -314,7 +314,7 @@ static int enumerate_dir(
                         dirs[n_dirs] = strdup(de->d_name);
                         if (!dirs[n_dirs])
                                 return -ENOMEM;
-                        n_dirs ++;
+                        n_dirs++;
                 }
 
                 if (!dirent_is_file(de))
@@ -326,7 +326,7 @@ static int enumerate_dir(
                 files[n_files] = strdup(de->d_name);
                 if (!files[n_files])
                         return -ENOMEM;
-                n_files ++;
+                n_files++;
         }
 
         strv_sort(dirs);
index f9f47cf7aacf670070486d6642d31d83f7863512..571683cd4b33f287706062a4eca292ef6be49955 100644 (file)
@@ -684,7 +684,7 @@ static int parse_argv_as_mount_helper(int argc, char *argv[]) {
         /* Implements util-linux "external helper" command line interface, as per mount(8) man page. */
 
         while ((c = getopt(argc, argv, "sfnvN:o:t:")) >= 0) {
-                switch(c) {
+                switch (c) {
 
                 case 'f':
                         fake = true;
index 5dd7bdb1e7ac0caa5e71dd80fc7ed42966a8b479..0e92c56e802c63986351abb485cad0a67083b046 100644 (file)
@@ -166,7 +166,7 @@ static int show_menu(char **x, unsigned n_columns, unsigned width, unsigned perc
 
         for (i = 0; i < per_column; i++) {
 
-                for (j = 0; j < n_columns; j ++) {
+                for (j = 0; j < n_columns; j++) {
                         _cleanup_free_ char *e = NULL;
 
                         if (j * per_column + i >= n)
index dd099a0a6f79a8aad97fc02af3601d9ab5ef1b3e..25618d0343ae0c109bc0c6439a3db0ef68680ebe 100644 (file)
@@ -136,11 +136,11 @@ int user_record_verify(UserRecord *ur, EVP_PKEY *public_key) {
                         return -EIO;
 
                 if (EVP_DigestVerify(md_ctx, signature, signature_size, (uint8_t*) text, strlen(text)) <= 0) {
-                        n_bad ++;
+                        n_bad++;
                         continue;
                 }
 
-                n_good ++;
+                n_good++;
         }
 
         return n_good > 0 ? (n_bad == 0 ? USER_RECORD_SIGNED_EXCLUSIVE : USER_RECORD_SIGNED) :
index c70656bc0e0359568a1438f328ab889269bbb4fc..fc34f306031ee287c5a7dfe90434fb0eb7342ccb 100644 (file)
@@ -273,7 +273,7 @@ int qcow2_convert(int qcow2_fd, int raw_fd) {
         if ((uint64_t) l != sz)
                 return -EIO;
 
-        for (i = 0; i < HEADER_L1_SIZE(&header); i ++) {
+        for (i = 0; i < HEADER_L1_SIZE(&header); i++) {
                 uint64_t l2_begin, j;
 
                 r = normalize_offset(&header, l1_table[i], &l2_begin, NULL, NULL);
index 78401f9857c0e174527b5652f83fe07c29cebfc5..b44f70006b5e22b86c6f4c787ae24e601cfca7c2 100644 (file)
@@ -612,7 +612,7 @@ static void client_context_try_shrink_to(Server *s, size_t limit) {
                         if (pid_is_unwaited(c->pid) == 0)
                                 client_context_free(s, c);
                         else
-                                idx ++;
+                                idx++;
                 }
 
                 s->last_cache_pid_flush = t;
index 5e216c5139c728dfa85e5d8209af5d005b5c0101..4025dd36325e2f8b02be52c1878654c09a50404d 100644 (file)
@@ -283,7 +283,7 @@ static int parse_options(const uint8_t options[], size_t buflen, uint8_t *overlo
         int r;
 
         while (offset < buflen) {
-                code = options[offset ++];
+                code = options[offset++];
 
                 switch (code) {
                 case SD_DHCP_OPTION_PAD:
@@ -296,7 +296,7 @@ static int parse_options(const uint8_t options[], size_t buflen, uint8_t *overlo
                 if (buflen < offset + 1)
                         return -ENOBUFS;
 
-                len = options[offset ++];
+                len = options[offset++];
 
                 if (buflen < offset + len)
                         return -EINVAL;
index c6d8caaf6d71b4a189bf0101cac0cd180f5d745a..33ae2a00f6859c329d850d7ef067955109b39880 100644 (file)
@@ -731,7 +731,7 @@ static int parse_caps(sd_bus_creds *c, unsigned offset, const char *p) {
                         return -ENOMEM;
         }
 
-        for (i = 0; i < sz; i ++) {
+        for (i = 0; i < sz; i++) {
                 uint32_t v = 0;
 
                 for (j = 0; j < 8; ++j) {
index c25c40ff3723a6c7f5b6fb9da516a512eeb6301f..e528987a6d451373ea9adc41a43ac7f6887a24ec 100644 (file)
@@ -1701,7 +1701,7 @@ static bool names_are_valid(const char *signature, const char **names, names_fla
         if ((*flags & NAMES_FIRST_PART || *flags & NAMES_SINGLE_PART) && **names != '\0')
                 *flags |= NAMES_PRESENT;
 
-        for (;*flags & NAMES_PRESENT;) {
+        while (*flags & NAMES_PRESENT) {
                 size_t l;
 
                 if (!*signature)
index 6a60cde4bbc8f42efcc5685b68aba48f05e95317..0eb0797e08fed9711c8ac236131e08348cc02e8e 100644 (file)
@@ -76,7 +76,7 @@ _public_ int sd_listen_fds(int unset_environment) {
                 goto finish;
         }
 
-        for (int fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++) {
+        for (int fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd++) {
                 r = fd_cloexec(fd, true);
                 if (r < 0)
                         goto finish;
index 1847ca4de05000373beb559cce96ab4beda7395d..071e72707eaecab3b6aa0f3143d1ac98a61186a2 100644 (file)
@@ -2488,7 +2488,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr,
 
         /* drop trailing newlines */
         while (len > 0 && strchr(NEWLINE, _value[len - 1]))
-                len --;
+                len--;
 
         /* value length is limited to 4k */
         if (len > 4096)
index 214974be0c85dbb2f686ac6fc290e87250f65a5b..896ea4deca840c203873e37fbb33a13d7f5eb630 100644 (file)
@@ -1165,10 +1165,10 @@ static int source_set_pending(sd_event_source *s, bool b) {
                 assert(s->inotify.inode_data->inotify_data);
 
                 if (b)
-                        s->inotify.inode_data->inotify_data->n_pending ++;
+                        s->inotify.inode_data->inotify_data->n_pending++;
                 else {
                         assert(s->inotify.inode_data->inotify_data->n_pending > 0);
-                        s->inotify.inode_data->inotify_data->n_pending --;
+                        s->inotify.inode_data->inotify_data->n_pending--;
                 }
         }
 
@@ -4000,7 +4000,7 @@ static int process_inotify(sd_event *e) {
                 if (r < 0)
                         return r;
                 if (r > 0)
-                        done ++;
+                        done++;
         }
 
         return done;
index 3eadb5f4e7721167960f4768dcd7611330e044c6..c762e76fc6316b52a732655ac3976493ad7c4c93 100644 (file)
@@ -2740,7 +2740,7 @@ static int parse_argv(int argc, char *argv[]) {
                                 /* If we already found the "shell" verb on the command line, and now found the next
                                  * non-option argument, then this is the machine name and we should stop processing
                                  * further arguments.  */
-                                optind --; /* don't process this argument, go one step back */
+                                optind--; /* don't process this argument, go one step back */
                                 goto done;
                         }
                         if (streq(optarg, "shell"))
index 607fe0053c3c3299fd3d662d32d5464374d74efc..a486fd892752e272723f37174109b0c17c7513cd 100644 (file)
@@ -423,7 +423,7 @@ static int dhcp4_server_configure(Link *link) {
                 return log_link_warning_errno(link, r, "Failed to %s Rapid Commit support for DHCPv4 server instance: %m",
                                               enable_disable(link->network->dhcp_server_rapid_commit));
 
-        for (sd_dhcp_lease_server_type_t type = 0; type < _SD_DHCP_LEASE_SERVER_TYPE_MAX; type ++) {
+        for (sd_dhcp_lease_server_type_t type = 0; type < _SD_DHCP_LEASE_SERVER_TYPE_MAX; type++) {
 
                 if (!link->network->dhcp_server_emit[type].emit)
                         continue;
index 0a8653033d0689c2968a9f192f3d72733d9a8a23..810ddbb45af2b4d27408d1e5655ad37f549eae78 100644 (file)
@@ -153,7 +153,7 @@ static int find_free_uid(const char *directory, uid_t max_uid, uid_t *current_ui
         assert(directory);
         assert(current_uid);
 
-        for (;; (*current_uid) ++) {
+        for (;; (*current_uid)++) {
                 if (*current_uid > MAP_UID_MAX || *current_uid > max_uid)
                         return log_error_errno(
                                         SYNTHETIC_ERRNO(EBUSY),
index 8f1ac7ccaddfae49d9b358da8b8be30b3482ff3a..e3b6f895d171dcef7e4d3429fd4441440d8838fb 100644 (file)
@@ -2082,7 +2082,7 @@ static int oci_hooks_array(const char *name, JsonVariant *v, JsonDispatchFlags f
                         return r;
                 }
 
-                (*n_array) ++;
+                (*n_array)++;
         }
 
         return 0;
index fb9df3d053f7f1fe08e7207e94f1886b79ca52d9..4d3783e00a943e44b3fa214be2d656270d0efa5e 100644 (file)
@@ -4455,7 +4455,7 @@ static int merge_settings(Settings *settings, const char *path) {
 #endif
         }
 
-        for (rl = 0; rl < _RLIMIT_MAX; rl ++) {
+        for (rl = 0; rl < _RLIMIT_MAX; rl++) {
                 if ((arg_settings_mask & (SETTING_RLIMIT_FIRST << rl)))
                         continue;
 
index afc9a2ed4522192de4c0269b8ccfdeeb215fa665..d44315ab1e63213448edc1bdf49103d2aae121dc 100644 (file)
@@ -493,7 +493,7 @@ static int dns_transaction_pick_server(DnsTransaction *t) {
         dns_server_unref(t->server);
         t->server = dns_server_ref(server);
 
-        t->n_picked_servers ++;
+        t->n_picked_servers++;
 
         log_debug("Using DNS server %s for transaction %u.", strna(dns_server_string_full(t->server)), t->id);
 
index 6cf08b898f0b70f971759b4ed6be320a475aebb7..9aa766139bb05c232f13233c19e42f423353cfea 100644 (file)
@@ -163,9 +163,9 @@ bool bitmap_iterate(const Bitmap *b, Iterator *i, unsigned *n) {
         rem = BITMAP_NUM_TO_REM(i->idx);
         bitmask = UINT64_C(1) << rem;
 
-        for (; offset < b->n_bitmaps; offset ++) {
+        for (; offset < b->n_bitmaps; offset++) {
                 if (b->bitmaps[offset]) {
-                        for (; bitmask; bitmask <<= 1, rem ++) {
+                        for (; bitmask; bitmask <<= 1, rem++) {
                                 if (b->bitmaps[offset] & bitmask) {
                                         *n = BITMAP_OFFSET_TO_NUM(offset, rem);
                                         i->idx = *n + 1;
index 0da28fc5c68b60c63a642202a5311acdc2bd4425..233e9c6b006896860316ed9b707d540434b2783b 100644 (file)
@@ -40,7 +40,7 @@ CompareOperator parse_compare_operator(const char **s, CompareOperatorParseFlags
                   * parse_compare_operator() are use on the same string? */
                 return _COMPARE_OPERATOR_INVALID;
 
-        for (size_t i = 0; i < ELEMENTSOF(table); i ++) {
+        for (size_t i = 0; i < ELEMENTSOF(table); i++) {
                 const char *e;
 
                 if (table[i].need_mask != 0 && !FLAGS_SET(flags, table[i].need_mask))
index 285b82a7e2b21a0343cbf0e0c96bb89f526c2329..6e559e17f4ad13189b8415234cd534371a5b4ee8 100644 (file)
@@ -150,7 +150,7 @@ int acquire_fido2_key_auto(
 
         /* Loads FIDO2 metadata from LUKS2 JSON token headers. */
 
-        for (int token = 0; token < sym_crypt_token_max(CRYPT_LUKS2); token ++) {
+        for (int token = 0; token < sym_crypt_token_max(CRYPT_LUKS2); token++) {
                 _cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
                 JsonVariant *w;
                 _cleanup_free_ void *salt = NULL;
index 98690367a15386d47af1924bd3aed06b789d04ed..6b0e5fe24847b701eba7dbdd001a011d9f065c71 100644 (file)
@@ -3396,7 +3396,7 @@ int dissected_image_acquire_metadata(DissectedImage *m, DissectImageFlags extra_
 
         assert(m);
 
-        for (; n_meta_initialized < _META_MAX; n_meta_initialized ++) {
+        for (; n_meta_initialized < _META_MAX; n_meta_initialized++) {
                 assert(paths[n_meta_initialized]);
 
                 if (pipe2(fds + 2*n_meta_initialized, O_CLOEXEC) < 0) {
index e5b8e92e8002289431a9f783fd4e2cf9cd27953d..b408a38c3710e96c7013de4d8639fbc49461cfca 100644 (file)
@@ -246,7 +246,7 @@ int fdset_new_listen_fds(FDSet **ret, bool unset) {
                 return -ENOMEM;
 
         n = sd_listen_fds(unset);
-        for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++) {
+        for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd++) {
                 r = fdset_put(s, fd);
                 if (r < 0)
                         return r;
index 14e35bec8d69b2c8c601e3621e3ac4340eb16fd8..25ba0d4b3b4c64d660b4042f8793ded107524b98 100644 (file)
@@ -43,7 +43,7 @@ typedef enum NFTSetSource {
         NFT_SET_SOURCE_GROUP,
         _NFT_SET_SOURCE_MAX,
         _NFT_SET_SOURCE_INVALID = -EINVAL,
-}  NFTSetSource;
+} NFTSetSource;
 
 typedef struct NFTSet {
         NFTSetSource source;
index 41471dade038964162787da96a81af7f5d118c83..66704f4660ebcd9fdce02d885a01c95c0648ba3a 100644 (file)
@@ -2632,7 +2632,7 @@ int table_print(Table *t, FILE *f) {
                         }
 
                         fputc('\n', f);
-                        n_subline ++;
+                        n_subline++;
                 } while (more_sublines);
         }
 
index 55e76b6e16bc6d8f78aa6f1e40405290b2c2d9a2..ef3dae5b6242fe1b01957846c0823d0f9f6ebea5 100644 (file)
@@ -226,9 +226,9 @@ int fstab_filter_options(
                                 if (IN_SET(*end, ',', '\0'))
                                         break;
                                 assert(*end == '\\');
-                                end ++;                 /* Skip the backslash */
+                                end++;                 /* Skip the backslash */
                                 if (*end != '\0')
-                                        end ++;         /* Skip the escaped char, but watch out for a trailing comma */
+                                        end++;         /* Skip the escaped char, but watch out for a trailing comma */
                         }
 
                         NULSTR_FOREACH(name, names) {
index 648bfc502655ee8df566de33ccc52edb3dea1627..d96902c7f26fe737eb1f38f6340c55dcad9c5384 100644 (file)
@@ -484,7 +484,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr
                 if (r == 0)
                         break;
 
-                line_number ++;
+                line_number++;
 
                 /* comment line */
                 if (line[0] == '#')
index 265407f080e1e158ed9318c419b584081c42d12c..ad30e9b49c1f6d7a068bc47b94aa517356e5f3c9 100644 (file)
@@ -1810,7 +1810,7 @@ int unit_file_verify_alias(
                 _cleanup_free_ char *dir = NULL;
                 char *p;
 
-                path_alias ++; /* skip over slash */
+                path_alias++; /* skip over slash */
 
                 r = path_extract_directory(dst, &dir);
                 if (r < 0)
index 06c9e850ea3173e6e94f72513226724a5c639862..af2fc9aa70c10dc2f0d72e2d50488f47cc454ed7 100644 (file)
@@ -559,7 +559,7 @@ static int _json_variant_array_put_element(JsonVariant *array, JsonVariant *elem
                 return -ELNRNG;
         if (d >= array->depth)
                 array->depth = d + 1;
-        array->n_elements ++;
+        array->n_elements++;
 
         *w = (JsonVariant) {
                 .is_embedded = true,
@@ -2310,7 +2310,7 @@ static int json_variant_copy(JsonVariant **nv, JsonVariant *v) {
                 source = json_variant_string(v);
                 k = strnlen(source, INLINE_STRING_MAX + 1);
                 if (k <= INLINE_STRING_MAX) {
-                        k ++;
+                        k++;
                         break;
                 }
 
@@ -2594,7 +2594,7 @@ static int json_parse_string(const char **p, char **ret) {
                                 return -ENOMEM;
 
                         s[n++] = ch;
-                        c ++;
+                        c++;
                         continue;
                 }
 
@@ -4574,7 +4574,7 @@ int json_dispatch_full(
                                 }
                         }
 
-                        done ++;
+                        done++;
 
                 } else { /* Didn't find a matching entry! ☹️ */
 
@@ -4589,7 +4589,7 @@ int json_dispatch_full(
 
                                         return r;
                                 } else
-                                        done ++;
+                                        done++;
 
                         } else  {
                                 json_log(value, flags, 0, "Unexpected object field '%s'.", json_variant_string(key));
index 1cc3afe6b9733f5065174ddb8530d72772894386..43efa3529ae7807c43ca6c0b6d908013aab089da 100644 (file)
@@ -574,7 +574,7 @@ static int fido2_use_hmac_hash_specific_token(
 
 /* COSE_ECDH_ES256 is not usable with fido_cred_set_type() thus it's not listed here. */
 static const char *fido2_algorithm_to_string(int alg) {
-        switch(alg) {
+        switch (alg) {
                 case COSE_ES256:
                         return "es256";
                 case COSE_RS256:
index a02baf8399d9af835bcf7133d74d25e83c2f5899..84d723487a37536b2e417a2c129b6d618e47a5ed 100644 (file)
@@ -60,7 +60,7 @@ static int start_loopback(sd_netlink *rtnl, struct state *s) {
         if (r < 0)
                 return r;
 
-        s->n_messages ++;
+        s->n_messages++;
         return 0;
 }
 
@@ -95,7 +95,7 @@ static int add_ipv4_address(sd_netlink *rtnl, struct state *s) {
         if (r < 0)
                 return r;
 
-        s->n_messages ++;
+        s->n_messages++;
         return 0;
 }
 
@@ -136,7 +136,7 @@ static int add_ipv6_address(sd_netlink *rtnl, struct state *s) {
         if (r < 0)
                 return r;
 
-        s->n_messages ++;
+        s->n_messages++;
         return 0;
 }
 
index 1226ca121e16609b6d7edfbd83313b5079dee3e4..d9de2789a582317ee32681e10f6df72da2eedfa5 100644 (file)
@@ -135,7 +135,7 @@ bool mount_point_is_api(const char *path) {
         /* Checks if this mount point is considered "API", and hence
          * should be ignored */
 
-        for (size_t i = 0; i < ELEMENTSOF(mount_table); i ++)
+        for (size_t i = 0; i < ELEMENTSOF(mount_table); i++)
                 if (path_equal(path, mount_table[i].where))
                         return true;
 
index 4664215e906204123587d7b3b63e0b0f78aa5861..767db48cc0d7a4c4e1c348129d6493c7e01c71f9 100644 (file)
@@ -326,7 +326,7 @@ static int rm_rf_children_impl(
                         dirname = mfree(dirname);
 
                         /* And now let's back out one level up */
-                        n_todo --;
+                        n_todo--;
                         d = TAKE_PTR(todos[n_todo].dir);
                         dirname = TAKE_PTR(todos[n_todo].dirname);
                         old_mode = todos[n_todo].old_mode;
index 655324c6c37101a148751ded438198782eb29481..858b493d2f60c0dbb580a06a9ee02bb8b0064ab2 100644 (file)
@@ -401,7 +401,7 @@ static int varlink_interface_realloc(VarlinkInterface **interface, size_t n_symb
 
         assert(interface);
 
-        n_symbols ++; /* Space for trailing NULL end marker symbol */
+        n_symbols++; /* Space for trailing NULL end marker symbol */
 
         /* Overflow check */
         if (n_symbols > (SIZE_MAX - offsetof(VarlinkInterface, symbols)) / sizeof(VarlinkSymbol*))
@@ -420,7 +420,7 @@ static int varlink_symbol_realloc(VarlinkSymbol **symbol, size_t n_fields) {
 
         assert(symbol);
 
-        n_fields ++; /* Space for trailing end marker field */
+        n_fields++; /* Space for trailing end marker field */
 
         /* Overflow check */
         if (n_fields > (SIZE_MAX - offsetof(VarlinkSymbol, fields)) / sizeof(VarlinkField))
index 8b8f72d678b1ac26fbbccdaad5140f7dcdeb14b6..f6f672c75ad5f2e99a64cd749c4f67d617cf2e9c 100644 (file)
@@ -132,7 +132,7 @@ static int dm_points_list_detach(DeviceMapper **head, bool *changed, bool last_t
                 if ((major(rootdev) != 0 && rootdev == m->devnum) ||
                     (major(usrdev) != 0 && usrdev == m->devnum)) {
                         log_debug("Not detaching DM %s that backs the OS itself, skipping.", m->path);
-                        n_failed ++;
+                        n_failed++;
                         continue;
                 }
 
index cf3130d4a7064d2bd9728da9a3f17bf6df510b78..ac46670f04f4432f34bb52390fa7aab42a6677cb 100644 (file)
@@ -153,7 +153,7 @@ static int md_points_list_detach(RaidDevice **head, bool *changed, bool last_try
                 if ((major(rootdev) != 0 && rootdev == m->devnum) ||
                     (major(usrdev) != 0 && usrdev == m->devnum)) {
                         log_debug("Not detaching MD %s that backs the OS itself, skipping.", m->path);
-                        n_failed ++;
+                        n_failed++;
                         continue;
                 }
 
index 33cb8c19635239839c6dad12e704c1ecf6b0b091..fe11fe0f07c980362c92cc7c5153554ebaba81e9 100644 (file)
@@ -854,7 +854,7 @@ static int merge_subprocess(
                 if (r < 0)
                         return log_oom();
 
-                n_extensions ++;
+                n_extensions++;
         }
 
         /* Nothing left? Then shortcut things */
index 4485e2e3680ec9cc1eda27ec20576209b7f07bb6..5689a60d785ad87513bb7c5501373e678cc00335 100644 (file)
@@ -807,7 +807,7 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
                 return r;
 
         STRV_FOREACH(p, sysvrcnd_path)
-                for (unsigned i = 0; i < ELEMENTSOF(rcnd_table); i ++) {
+                for (unsigned i = 0; i < ELEMENTSOF(rcnd_table); i++) {
                         _cleanup_closedir_ DIR *d = NULL;
                         _cleanup_free_ char *path = NULL;
 
index 2f52bca59aef944e32293cebc65253bf9f1e91ce..2cf44d6e5abf0184e629375b23d6a5979904efd3 100644 (file)
@@ -11,7 +11,7 @@ static int callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error)
 static void destroy_callback(void *userdata) {
         int *n_called = userdata;
 
-        (*n_called) ++;
+        (*n_called)++;
 }
 
 TEST(destroy_callback) {
index e8a056973751c5beeb747ec5ab8cebcc3e2a3863..9df5f5ba07084d1b8c3a6efc35c8d60279da8d43 100644 (file)
@@ -54,7 +54,7 @@ static void test_last_cap_probe(void) {
         unsigned long p = (unsigned long)CAP_LAST_CAP;
 
         if (prctl(PR_CAPBSET_READ, p) < 0) {
-                for (p--; p > 0; p --)
+                for (p--; p > 0; p--)
                         if (prctl(PR_CAPBSET_READ, p) >= 0)
                                 break;
         } else {
index b91a1f96ac71b5b9b86eda8a76982569e8d4e2a3..95b70142aabeb89e684362cf634140c6cd37edc9 100644 (file)
@@ -306,7 +306,7 @@ TEST(FOREACH_VA_ARGS) {
         i = 0;
         uint8_t u8, u8_1 = 1, u8_2 = 2, u8_3 = 3;
         VA_ARGS_FOREACH(u8, u8_2, 8, 0xff, u8_1, u8_3, 0, 1) {
-                switch(i++) {
+                switch (i++) {
                 case 0: assert_se(u8 == u8_2); break;
                 case 1: assert_se(u8 == 8); break;
                 case 2: assert_se(u8 == 0xff); break;
@@ -336,7 +336,7 @@ TEST(FOREACH_VA_ARGS) {
         i = 0;
         uint32_t u32, u32_1 = 0xffff0000, u32_2 = 10, u32_3 = 0xffff;
         VA_ARGS_FOREACH(u32, 1, 100, u32_2, 1000, u32_3, u32_1, 1, 0) {
-                switch(i++) {
+                switch (i++) {
                 case 0: assert_se(u32 == 1); break;
                 case 1: assert_se(u32 == 100); break;
                 case 2: assert_se(u32 == u32_2); break;
@@ -367,7 +367,7 @@ TEST(FOREACH_VA_ARGS) {
         i = 0;
         uint64_t u64, u64_1 = 0xffffffffffffffff, u64_2 = 50, u64_3 = 0xffff;
         VA_ARGS_FOREACH(u64, 44, 0, u64_3, 100, u64_2, u64_1, 50000) {
-                switch(i++) {
+                switch (i++) {
                 case 0: assert_se(u64 == 44); break;
                 case 1: assert_se(u64 == 0); break;
                 case 2: assert_se(u64 == u64_3); break;
@@ -406,7 +406,7 @@ TEST(FOREACH_VA_ARGS) {
                 s_3 = { .a = 0xff, .b = 'q', },
                 s_4 = { .a = 1, .b = 'x', };
         VA_ARGS_FOREACH(s, s_1, (struct test){ .a = 10, .b = 'd', }, s_2, (struct test){}, s_3, s_4) {
-                switch(i++) {
+                switch (i++) {
                 case 0: assert_se(s.a == 0     ); assert_se(s.b == 'c'); break;
                 case 1: assert_se(s.a == 10    ); assert_se(s.b == 'd'); break;
                 case 2: assert_se(s.a == 100000); assert_se(s.b == 'z'); break;
@@ -430,7 +430,7 @@ TEST(FOREACH_VA_ARGS) {
         i = 0;
         struct test *p, *p_1 = &s_1, *p_2 = &s_2, *p_3 = &s_3, *p_4 = &s_4;
         VA_ARGS_FOREACH(p, p_1, NULL, p_2, p_3, NULL, p_4, NULL) {
-                switch(i++) {
+                switch (i++) {
                 case 0: assert_se(p == p_1); break;
                 case 1: assert_se(p == NULL); break;
                 case 2: assert_se(p == p_2); break;
@@ -455,7 +455,7 @@ TEST(FOREACH_VA_ARGS) {
         void *v, *v_1 = p_1, *v_2 = p_2, *v_3 = p_3;
         uint32_t *u32p = &u32;
         VA_ARGS_FOREACH(v, v_1, NULL, u32p, v_3, p_2, p_4, v_2, NULL) {
-                switch(i++) {
+                switch (i++) {
                 case 0: assert_se(v == v_1); break;
                 case 1: assert_se(v == NULL); break;
                 case 2: assert_se(v == u32p); break;
index d3bc173fd4539f13a0035263fde7397aa66efaf7..1f071dba05af69db7ea4714bc9c9f85201a29b7c 100644 (file)
@@ -35,7 +35,7 @@ TEST(mempool_trim) {
                 assert_se(!a[x] || a[x]->value == x);
 
                 if (a[x])
-                        n_freed ++;
+                        n_freed++;
 
                 a[x] = mempool_free_tile(&test_mempool, a[x]);
         }
@@ -46,7 +46,7 @@ TEST(mempool_trim) {
         for (size_t i = 2; i < NN; i += 3) {
                 assert_se(!a[i] || a[i]->value == i);
                 if (a[i])
-                        n_freed ++;
+                        n_freed++;
                 a[i] = mempool_free_tile(&test_mempool, a[i]);
         }
 
@@ -66,7 +66,7 @@ TEST(mempool_trim) {
         for (size_t i = 0; i < NN; i += 1) {
                 assert_se(!a[i] || a[i]->value == i);
                 if (a[i])
-                        n_freed ++;
+                        n_freed++;
                 a[i] = mempool_free_tile(&test_mempool, a[i]);
         }
 
@@ -77,7 +77,7 @@ TEST(mempool_trim) {
         for (size_t i = 0; i < NN; i += 1) {
                 assert_se(!b[i] || b[i]->value == ~(uint64_t) i);
                 if (b[i])
-                        n_freed ++;
+                        n_freed++;
                 b[i] = mempool_free_tile(&test_mempool, b[i]);
         }
 
index 40b12dd0880724cb4f0faf7481be391f9d6e8461..0c1b849c89763f4944800ca201d6875e648ad1f8 100644 (file)
@@ -69,7 +69,7 @@ TEST(mnt_id) {
                 assert_se(sscanf(line, "%i %*s %*s %*s %ms", &mnt_id, &path) == 2);
 #if HAS_FEATURE_MEMORY_SANITIZER
                 /* We don't know the length of the string, so we need to unpoison it one char at a time */
-                for (const char *c = path; ;c++) {
+                for (const char *c = path; ; c++) {
                         msan_unpoison(c, 1);
                         if (!*c)
                                 break;
index 06b9800dec791270fb7271c173e5aea2b170fbf5..19881c6e91f447bbd8dbef3de8316bb389a49836 100644 (file)
@@ -74,7 +74,7 @@ TEST(tpm2_util_pbkdf2_hmac_sha256) {
         };
 
         uint8_t res[SHA256_DIGEST_SIZE];
-        for(size_t i = 0; i < sizeof(test_vectors)/sizeof(test_vectors[0]); i++) {
+        for (size_t i = 0; i < sizeof(test_vectors)/sizeof(test_vectors[0]); i++) {
 
                 int rc = tpm2_util_pbkdf2_hmac_sha256(
                                 test_vectors[i].pass,
index 37c098adc86a5b6184bb747aa9393efc4d7cd8d2..9ad41403bab02ff108337f937729155be0c9f4a3 100644 (file)
@@ -96,7 +96,7 @@ static const char *dmi_string(const struct dmi_header *dm, uint8_t s) {
                 return "Not Specified";
 
         bp += dm->length;
-        for (;s > 1 && !isempty(bp); s--)
+        for (; s > 1 && !isempty(bp); s--)
                 bp += strlen(bp) + 1;
 
         if (isempty(bp))