]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: insert a space at the end of comments
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 24 Jan 2025 20:16:27 +0000 (05:16 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 24 Jan 2025 20:24:23 +0000 (05:24 +0900)
27 files changed:
src/basic/fileio.c
src/basic/pidref.h
src/basic/strv.c
src/basic/time-util.c
src/boot/pe.h
src/core/execute.c
src/core/kmod-setup.c
src/libsystemd-network/sd-dns-resolver.c
src/libsystemd-network/sd-dns-resolver.h
src/libsystemd/sd-journal/journal-file.c
src/libsystemd/sd-netlink/netlink-util.c
src/login/logind-session.h
src/machine/operation.c
src/network/networkd-ndisc.c
src/network/networkd-nexthop.c
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-packet.c
src/shared/efi-loader.c
src/shared/mkfs-util.c
src/shared/ptyfwd.c
src/systemd/sd-netlink.h
src/systemd/sd-varlink-idl.h
src/sysupdate/updatectl.c
src/test/test-label.c
src/test/test-mempool.c
src/test/test-string-util.c
src/vconsole/vconsole-setup.c

index 622a13495aed55b56050b11a84fea953dbfa94e5..25c45182613e6cb1a39ba01331b20beedde77eec 100644 (file)
@@ -720,7 +720,7 @@ int read_full_stream_full(
                 size_t k;
 
                 /* If we shall fail when reading overly large data, then read exactly one byte more than the
-                 * specified size at max, since that'll tell us if there's anymore data beyond the limit*/
+                 * specified size at max, since that'll tell us if there's anymore data beyond the limit*/
                 if (FLAGS_SET(flags, READ_FULL_FILE_FAIL_WHEN_LARGER) && n_next > size)
                         n_next = size + 1;
 
index 9e8a39ecfbbbb9225d2b746aebf57447f6b5daf6..0198db8f8eb5ca25f7c41ff814ab2b55d89fb65f 100644 (file)
@@ -43,7 +43,7 @@ struct PidRef {
 
 /* A special pidref value that we are using when a PID shall be automatically acquired from some surrounding
  * context, for example connection peer. Much like PIDREF_NULL it will be considered unset by
- * pidref_is_set().*/
+ * pidref_is_set(). */
 #define PIDREF_AUTOMATIC (const PidRef) { .pid = PID_AUTOMATIC, .fd = -EBADF }
 
 /* Turns a pid_t into a PidRef structure on-the-fly *without* acquiring a pidfd for it. (As opposed to
@@ -70,7 +70,7 @@ bool pidref_equal(PidRef *a, PidRef *b);
 int pidref_set_pid(PidRef *pidref, pid_t pid);
 int pidref_set_pidstr(PidRef *pidref, const char *pid);
 int pidref_set_pidfd(PidRef *pidref, int fd);
-int pidref_set_pidfd_take(PidRef *pidref, int fd); /* takes ownership of the passed pidfd on success*/
+int pidref_set_pidfd_take(PidRef *pidref, int fd); /* takes ownership of the passed pidfd on success */
 int pidref_set_pidfd_consume(PidRef *pidref, int fd); /* takes ownership of the passed pidfd in both success and failure */
 int pidref_set_parent(PidRef *ret);
 static inline int pidref_set_self(PidRef *pidref) {
index 7a42a0d44d20b144e2c252d5b1b02a3a5756ffc7..5835a361c9c2740d522638ba1542d36489c0880d 100644 (file)
@@ -631,7 +631,7 @@ int strv_insert(char ***l, size_t position, char *value) {
         n = strv_length(*l);
         position = MIN(position, n);
 
-        /* check for overflow and increase*/
+        /* check for overflow and increase */
         if (n > SIZE_MAX - 2)
                 return -ENOMEM;
         m = n + 2;
index aa51334100a3411c68cdfa1774492d17d99331ee..77f354fd1f469ff2c2890754570c04d20446fcfe 100644 (file)
@@ -1636,7 +1636,7 @@ int mktime_or_timegm_usec(
 
         assert(tm);
 
-        if (tm->tm_year < 69) /* early check for negative (i.e. before 1970) time_t (Note that in some timezones the epoch is in the year 1969!)*/
+        if (tm->tm_year < 69) /* early check for negative (i.e. before 1970) time_t (Note that in some timezones the epoch is in the year 1969!) */
                 return -ERANGE;
         if ((usec_t) tm->tm_year > CONST_MIN(USEC_INFINITY / USEC_PER_YEAR, (usec_t) TIME_T_MAX / (365U * 24U * 60U * 60U)) - 1900) /* early check for possible overrun of usec_t or time_t */
                 return -ERANGE;
index 56312b15b3b5c1a1c0d08174d417b3215323056b..a2847de8827555794cbf3e15d729c00dfe9d3519 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "efi.h"
 
-/* This is the actual PE format of the section header*/
+/* This is the actual PE format of the section header */
 typedef struct PeSectionHeader {
         uint8_t  Name[8];
         uint32_t VirtualSize;
index 2ce67f9dbdd5a5b67352f2a9ef7f4283e8eaef3f..6811bf301ca268b7187e5fac63625ea64d244e43 100644 (file)
@@ -776,7 +776,7 @@ int exec_context_destroy_mount_ns_dir(Unit *u) {
         if (!p)
                 return -ENOMEM;
 
-        /* This is only filled transiently (see mount_in_namespace()), should be empty or even non-existent*/
+        /* This is only filled transiently (see mount_in_namespace()), should be empty or even non-existent*/
         if (rmdir(p) < 0 && errno != ENOENT)
                 log_unit_debug_errno(u, errno, "Unable to remove propagation dir '%s', ignoring: %m", p);
 
index c39b136e046076d7633fd8cd1312cc59c941366e..5dc429a07db29525a08d19e10197943fc4068a78 100644 (file)
@@ -124,7 +124,7 @@ int kmod_setup(void) {
                 { "virtio_rng",                 NULL,                        false, false, has_virtio_rng     },
 
                 /* we want early logging to hvc consoles if possible, and make sure systemd-getty-generator
-                 * can rely on all consoles being probed already.*/
+                 * can rely on all consoles being probed already. */
                 { "virtio_console",             NULL,                        false, false, has_virtio_console },
 
                 /* Make sure we can send sd-notify messages over vsock as early as possible. */
index 548672cd33102fbc9eecb04ca00638158ea917d7..5b4ed6e23aae7dc12a719fa64974d5b36267eef2 100644 (file)
@@ -234,7 +234,7 @@ int dnr_parse_svc_params(const uint8_t *option, size_t len, sd_dns_resolver *res
                 /* Mandatory keys must be understood by the client, otherwise the record should be discarded.
                  * Automatic mandatory keys must not appear in the mandatory parameter, so these are all
                  * supplementary. We don't understand any supplementary keys, so if the mandatory parameter
-                 * is present, we cannot use this record.*/
+                 * is present, we cannot use this record. */
                 case DNS_SVC_PARAM_KEY_MANDATORY:
                         if (plen > 0)
                                 return -EBADMSG;
index 79d00ba9bc1468b070b2e9bc0deb0711aaf4b0c5..5acd4fe4f684cca88503b118061bfde89768ed99 100644 (file)
@@ -16,7 +16,7 @@ typedef struct sd_dns_resolver sd_dns_resolver;
 typedef enum sd_dns_alpn_flags {
         /* There isn't really an alpn reserved for Do53 service, but designated resolvers may or may not offer
          * Do53 service, so we should probably have a flag to represent this capability. Unfortunately DNR
-         * does not indicate the status to us.*/
+         * does not indicate the status to us. */
         SD_DNS_ALPN_DO53           = 1 << 0,
         /* SD_DNS_ALPN_HTTP_1_1,                "http/1.1" [RFC9112] */
         SD_DNS_ALPN_HTTP_2_TLS     = 1 << 1, /* "h2"  [RFC9113] [RFC9461] */
index fe45e3e7cea20425b542a62f313f50794a956300..508b47cbe78d0e0adfe5d8ca5fe068714c7ccc94 100644 (file)
@@ -2341,7 +2341,7 @@ static int journal_file_append_entry_internal(
                 if (sd_id128_is_null(*seqnum_id))
                         *seqnum_id = f->header->seqnum_id; /* Caller has none assigned, then copy the one from the file */
                 else if (!sd_id128_equal(*seqnum_id, f->header->seqnum_id)) {
-                        /* Different seqnum IDs? We can't allow entries from multiple IDs end up in the same journal.*/
+                        /* Different seqnum IDs? We can't allow entries from multiple IDs end up in the same journal. */
                         if (le64toh(f->header->n_entries) == 0)
                                 f->header->seqnum_id = *seqnum_id; /* Caller has one, and file so far has no entries, then copy the one from the caller */
                         else
index 90616094bc88a7fbed85699630f47dc8e18b78e9..5aa6da7b83e58e4750983aea05a214f3cc5b0f67 100644 (file)
@@ -95,7 +95,7 @@ int rtnl_resolve_ifname_full(
 
         /* This is similar to if_nametoindex(), but also resolves alternative names and decimal formatted
          * ifindex too. Returns ifindex, and optionally provides the main interface name and alternative
-         * names.*/
+         * names. */
 
         if (!rtnl)
                 rtnl = &our_rtnl;
index a3e34b0713f493b6572d5c1b8279e11e5bf889a3..9b32d4bd7c65ad82b1916a2dde4432d8adc88f46 100644 (file)
@@ -51,7 +51,7 @@ typedef enum SessionClass {
 /* Which session classes can pin our user tracking? */
 #define SESSION_CLASS_PIN_USER(class) (!IN_SET((class), SESSION_MANAGER, SESSION_MANAGER_EARLY, SESSION_NONE))
 
-/* Which session classes decide whether system is idle? (should only cover sessions that have input, and are not idle screens themselves)*/
+/* Which session classes decide whether system is idle? (should only cover sessions that have input, and are not idle screens themselves) */
 #define SESSION_CLASS_CAN_IDLE(class) (IN_SET((class), SESSION_USER, SESSION_USER_EARLY, SESSION_USER_EARLY_LIGHT, SESSION_USER_LIGHT, SESSION_GREETER))
 
 /* Which session classes have a lock screen concept? */
index 9e4e7e3dceef9c87200c90300b5565f9d9560b77..ef4e178a8c0b1a604f59f2b767ba50cd6b08dea3 100644 (file)
@@ -50,7 +50,7 @@ static int operation_done(sd_event_source *s, const siginfo_t *si, void *userdat
                 /* If o->done set, call it. It sends a response, but can return
                  * an error in which case it expect this code to reply.
                  * If o->done is not set, the default action is to simply return
-                 * an error on failure or an empty success message on success.*/
+                 * an error on failure or an empty success message on success. */
 
                 _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
                 if (o->done)
@@ -73,7 +73,7 @@ static int operation_done(sd_event_source *s, const siginfo_t *si, void *userdat
                 /* If o->done set, call it. Unlike o->message case above, this
                  * code expect o->done to reply in all cases.
                  * If o->done is not set, the default action is to simply return
-                 * an error on failure or an empty success message on success.*/
+                 * an error on failure or an empty success message on success. */
 
                 if (o->done)
                         (void) o->done(o, r, /* error = */ NULL);
index e778300c70cc2e331e343a66034f46ce7ca4439c..42bed0d642ad025eb81110fcc9cff0bffffb93d1 100644 (file)
@@ -1375,7 +1375,7 @@ static int ndisc_router_process_hop_limit(Link *link, sd_ndisc_router *rt) {
          * the first Router Advertisement was received.
          *
          * If the received Cur Hop Limit value is non-zero, the host SHOULD set
-         * its CurHopLimit variable to the received value.*/
+         * its CurHopLimit variable to the received value. */
         if (hop_limit <= 0)
                 return 0;
 
index a3bf4aa1c09a756f15220fa1b82c63a40833518c..c962e882d86df50c55349c2deef6364745c8cb31 100644 (file)
@@ -894,7 +894,7 @@ static bool nexthop_can_update(const NextHop *assigned_nexthop, const NextHop *r
 
         /* There are several more conditions if we can replace a group nexthop, e.g. hash threshold and
          * resilience. But, currently we do not support to modify that. Let's add checks for them in the
-         * future when we support to configure them.*/
+         * future when we support to configure them. */
 
         /* When a nexthop is replaced with a blackhole nexthop, and a group nexthop has multiple nexthops
          * including this nexthop, then the kernel refuses to replace the existing nexthop.
index 1310bd5f8b690d3828fffdc95e4a02ee11afbdfa..c7b51c0224663e4b56c5abcecb4c6e7d2ea13bf5 100644 (file)
@@ -511,7 +511,7 @@ static int dns_cache_put_positive(
         /* If StaleRetentionSec is greater than zero, the 'until' property is set to a duration
          * of StaleRetentionSec from the time of TTL expiry.
          * If StaleRetentionSec is zero, both the 'until' and 'until_valid' are set to the TTL duration,
-         * leading to the eviction of the record once the TTL expires.*/
+         * leading to the eviction of the record once the TTL expires. */
         usec_t until_valid = calculate_until_valid(rr, min_ttl, UINT32_MAX, timestamp, false);
         *i = (DnsCacheItem) {
                 .type = DNS_CACHE_POSITIVE,
index 1d235b4aff78a206d95bbe0d00694fc1ed359c36..054ce5c3d16bbed5ec257a9c31d6382d099a9317 100644 (file)
@@ -1831,7 +1831,7 @@ int dns_packet_read_rr(
                 return r;
 
         /* RFC 2181, Section 8, suggests to treat a TTL with the MSB set as a zero TTL. We avoid doing this
-         * for OPT records so that all 8 bits of the extended RCODE may be used .*/
+         * for OPT records so that all 8 bits of the extended RCODE may be used*/
         if (key->type != DNS_TYPE_OPT && rr->ttl & UINT32_C(0x80000000))
                 rr->ttl = 0;
 
index 3eddc49bf94188b83e71fd58b7e5df603395d387..3f551b6b1c64b898c17d9abd75c3c5baa26d6ef1 100644 (file)
@@ -92,7 +92,7 @@ int efi_loader_get_entries(char ***ret) {
                 return r;
 
         /* The variable contains a series of individually NUL terminated UTF-16 strings. We gracefully
-         * consider the final NUL byte optional (i.e. the last string may or may not end in a NUL byte).*/
+         * consider the final NUL byte optional (i.e. the last string may or may not end in a NUL byte). */
 
         for (size_t i = 0, start = 0;; i++) {
                 _cleanup_free_ char *decoded = NULL;
index 55d3899532c7b5dfd37357dca2f256933727d17b..87c7d52a979439a5a78abffa5aaff73684bd1849 100644 (file)
@@ -206,7 +206,7 @@ static int protofile_print_item(
          * delimiter. To work around this limitation, mkfs.xfs allows escaping whitespace by using the /
          * character (which isn't allowed in filenames and as such can be used to escape whitespace). See
          * https://lore.kernel.org/linux-xfs/20230222090303.h6tujm7y32gjhgal@andromeda/T/#m8066b3e7d62a080ee7434faac4861d944e64493b
-         * for more information.*/
+         * for more information. */
 
         if (strchr(de->d_name, ' ')) {
                 copy = strdup(de->d_name);
index d47bbccd9ec0b4774c28997fa898ed82dfa3bd06..fb7c1c05cf8c9c8ac22860cec296d7a2f2aa7dd6 100644 (file)
@@ -426,7 +426,7 @@ static int insert_window_title_fix(PTYForward *f, size_t offset) {
         if (!f->osc_sequence)
                 return 0;
 
-        const char *t = startswith(f->osc_sequence, "0;"); /* Set window title OSC sequence*/
+        const char *t = startswith(f->osc_sequence, "0;"); /* Set window title OSC sequence */
         if (!t)
                 return 0;
 
index aeb08ef97febf986d128a4010c28d665cc5908c2..26633276da058ebe379f58a44bb5a0e067ff30ff 100644 (file)
@@ -206,7 +206,7 @@ int sd_rtnl_message_new_routing_policy_rule(sd_netlink *rtnl, sd_netlink_message
 int sd_rtnl_message_routing_policy_rule_get_family(sd_netlink_message *m, int *ret); /* family */
 int sd_rtnl_message_routing_policy_rule_set_dst_prefixlen(sd_netlink_message *m, uint8_t prefixlen); /* dst_len */
 int sd_rtnl_message_routing_policy_rule_get_dst_prefixlen(sd_netlink_message *m, uint8_t *ret);
-int sd_rtnl_message_routing_policy_rule_set_src_prefixlen(sd_netlink_message *m, uint8_t prefixlen); /* src_len*/
+int sd_rtnl_message_routing_policy_rule_set_src_prefixlen(sd_netlink_message *m, uint8_t prefixlen); /* src_len */
 int sd_rtnl_message_routing_policy_rule_get_src_prefixlen(sd_netlink_message *m, uint8_t *ret);
 int sd_rtnl_message_routing_policy_rule_set_tos(sd_netlink_message *m, uint8_t tos); /* tos */
 int sd_rtnl_message_routing_policy_rule_get_tos(sd_netlink_message *m, uint8_t *ret);
index fe65c00eb68b58c61589fa2316169438f5b58f52..63d79d33f7bceb176d3d08e65a87db752f8fb95c 100644 (file)
@@ -70,7 +70,7 @@ __extension__ typedef enum _SD_ENUM_TYPE_S64(sd_varlink_field_type_t) {
         SD_VARLINK_STRING,
         SD_VARLINK_OBJECT,
         SD_VARLINK_ENUM_VALUE,
-        _SD_VARLINK_FIELD_COMMENT,        /* Not really a field, just a comment about a field*/
+        _SD_VARLINK_FIELD_COMMENT,        /* Not really a field, just a comment about a field */
         _SD_VARLINK_FIELD_TYPE_MAX,
         _SD_VARLINK_FIELD_TYPE_INVALID = -EINVAL,
         _SD_ENUM_FORCE_S64(SD_VARLINK_FIELD)
index 6cb7c6fbf19839d3e736aafb5cd99f803fc210aa..53ccc59a7f090492e6194dc625fcd5cc1893d768 100644 (file)
@@ -831,7 +831,7 @@ static int update_render_progress(sd_event_source *source, void *userdata) {
 
         if (!terminal_is_dumb()) {
                 for (size_t i = 0; i <= n; i++)
-                        fputs("\n", stderr); /* Possibly scroll the terminal to make room (including total)*/
+                        fputs("\n", stderr); /* Possibly scroll the terminal to make room (including total) */
 
                 fprintf(stderr, "\e[%zuF", n+1); /* Go back */
 
index 06690ec86c9055d306b049dc642b77d9d4b847b7..cac6cc0f50b999c64d668a5336994e4c9955edd4 100644 (file)
@@ -22,7 +22,7 @@ static int check_path(int dir_fd, const char *path) {
         if (isempty(path))
                 return -EINVAL;
 
-        /* assume length of pathname is not greater than 40*/
+        /* assume length of pathname is not greater than 40 */
         if (strlen(path) > 40)
                 return -ENAMETOOLONG;
 
@@ -60,7 +60,7 @@ static int post_labelling_func(int dir_fd, const char *path, bool created) {
 }
 
 static int get_dir_fd(const char *dir_path, mode_t mode) {
-        /* create a new directory and return its descriptor*/
+        /* create a new directory and return its descriptor */
         int dir_fd = -EBADF;
 
         assert(dir_path);
@@ -83,12 +83,12 @@ static int labelling_op(int dir_fd, const char *text, const char *path, mode_t m
         if (r < 0)
                 return log_error_errno(r, "Error in pathname =>: %m");
 
-        /* Open the file within the directory for writing*/
+        /* Open the file within the directory for writing */
         write_fd = RET_NERRNO(openat(dir_fd, path, O_CLOEXEC|O_WRONLY|O_TRUNC|O_CREAT, 0644));
         if (write_fd < 0)
                 return log_error_errno(write_fd, "Error in opening directory for writing =>: %m");
 
-        /* Write data to the file*/
+        /* Write data to the file */
         count = RET_NERRNO(write(write_fd, text, strlen(text)));
         if (count < 0)
                 return log_error_errno(count, "Error occurred while opening file for writing =>: %m");
index 1f071dba05af69db7ea4714bc9c9f85201a29b7c..b8f139ca30391ed27d138e7b1eafb978c19d7d3c 100644 (file)
@@ -61,7 +61,7 @@ TEST(mempool_trim) {
 
         mempool_trim(&test_mempool);
 
-        /* free everything from the original set*/
+        /* free everything from the original set */
 
         for (size_t i = 0; i < NN; i += 1) {
                 assert_se(!a[i] || a[i]->value == i);
index 2b44905346e789cac109151add5c5c759c19f077..fbfb3990e425b43a8726c64624b5f0c263e1a755 100644 (file)
@@ -1200,7 +1200,7 @@ TEST(strspn_from_end) {
 }
 
 TEST(streq_skip_trailing_chars) {
-        /* NULL is WHITESPACE by default*/
+        /* NULL is WHITESPACE by default */
         assert_se(streq_skip_trailing_chars("foo bar", "foo bar", NULL));
         assert_se(streq_skip_trailing_chars("foo", "foo", NULL));
         assert_se(streq_skip_trailing_chars("foo bar      ", "foo bar", NULL));
index 3fa0cbba614e1f20b26963f1fe450e466660d9c9..7142405657578fe59ddb6def0e3f44684ab4b3eb 100644 (file)
@@ -575,7 +575,7 @@ static int verify_source_vc(char **ret_path, const char *src_vc) {
 
         /* setfont(8) silently ignores when the font can't be applied due to the vc being in
          * KD_GRAPHICS. Hence we continue to accept this case however we now let the user know that the vc
-         * will be initialized only partially.*/
+         * will be initialized only partially. */
         r = verify_vc_display_mode(fd);
         if (r < 0)
                 log_notice_errno(r, "Virtual console %s is not in KD_TEXT, font settings likely won't be applied.", src_vc);