From: Yu Watanabe Date: Fri, 24 Jan 2025 20:16:27 +0000 (+0900) Subject: tree-wide: insert a space at the end of comments X-Git-Tag: v258-rc1~1491 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d7306348b28c896d0db41a21882b24f67bad25b4;p=thirdparty%2Fsystemd.git tree-wide: insert a space at the end of comments --- diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 622a13495ae..25c45182613 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -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; diff --git a/src/basic/pidref.h b/src/basic/pidref.h index 9e8a39ecfbb..0198db8f8eb 100644 --- a/src/basic/pidref.h +++ b/src/basic/pidref.h @@ -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) { diff --git a/src/basic/strv.c b/src/basic/strv.c index 7a42a0d44d2..5835a361c9c 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -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; diff --git a/src/basic/time-util.c b/src/basic/time-util.c index aa51334100a..77f354fd1f4 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -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; diff --git a/src/boot/pe.h b/src/boot/pe.h index 56312b15b3b..a2847de8827 100644 --- a/src/boot/pe.h +++ b/src/boot/pe.h @@ -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; diff --git a/src/core/execute.c b/src/core/execute.c index 2ce67f9dbdd..6811bf301ca 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -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); diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c index c39b136e046..5dc429a07db 100644 --- a/src/core/kmod-setup.c +++ b/src/core/kmod-setup.c @@ -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. */ diff --git a/src/libsystemd-network/sd-dns-resolver.c b/src/libsystemd-network/sd-dns-resolver.c index 548672cd331..5b4ed6e23aa 100644 --- a/src/libsystemd-network/sd-dns-resolver.c +++ b/src/libsystemd-network/sd-dns-resolver.c @@ -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; diff --git a/src/libsystemd-network/sd-dns-resolver.h b/src/libsystemd-network/sd-dns-resolver.h index 79d00ba9bc1..5acd4fe4f68 100644 --- a/src/libsystemd-network/sd-dns-resolver.h +++ b/src/libsystemd-network/sd-dns-resolver.h @@ -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] */ diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c index fe45e3e7cea..508b47cbe78 100644 --- a/src/libsystemd/sd-journal/journal-file.c +++ b/src/libsystemd/sd-journal/journal-file.c @@ -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 diff --git a/src/libsystemd/sd-netlink/netlink-util.c b/src/libsystemd/sd-netlink/netlink-util.c index 90616094bc8..5aa6da7b83e 100644 --- a/src/libsystemd/sd-netlink/netlink-util.c +++ b/src/libsystemd/sd-netlink/netlink-util.c @@ -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; diff --git a/src/login/logind-session.h b/src/login/logind-session.h index a3e34b0713f..9b32d4bd7c6 100644 --- a/src/login/logind-session.h +++ b/src/login/logind-session.h @@ -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? */ diff --git a/src/machine/operation.c b/src/machine/operation.c index 9e4e7e3dcee..ef4e178a8c0 100644 --- a/src/machine/operation.c +++ b/src/machine/operation.c @@ -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); diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index e778300c70c..42bed0d642a 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -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; diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c index a3bf4aa1c09..c962e882d86 100644 --- a/src/network/networkd-nexthop.c +++ b/src/network/networkd-nexthop.c @@ -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. diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c index 1310bd5f8b6..c7b51c02246 100644 --- a/src/resolve/resolved-dns-cache.c +++ b/src/resolve/resolved-dns-cache.c @@ -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, diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c index 1d235b4aff7..054ce5c3d16 100644 --- a/src/resolve/resolved-dns-packet.c +++ b/src/resolve/resolved-dns-packet.c @@ -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; diff --git a/src/shared/efi-loader.c b/src/shared/efi-loader.c index 3eddc49bf94..3f551b6b1c6 100644 --- a/src/shared/efi-loader.c +++ b/src/shared/efi-loader.c @@ -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; diff --git a/src/shared/mkfs-util.c b/src/shared/mkfs-util.c index 55d3899532c..87c7d52a979 100644 --- a/src/shared/mkfs-util.c +++ b/src/shared/mkfs-util.c @@ -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); diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c index d47bbccd9ec..fb7c1c05cf8 100644 --- a/src/shared/ptyfwd.c +++ b/src/shared/ptyfwd.c @@ -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; diff --git a/src/systemd/sd-netlink.h b/src/systemd/sd-netlink.h index aeb08ef97fe..26633276da0 100644 --- a/src/systemd/sd-netlink.h +++ b/src/systemd/sd-netlink.h @@ -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); diff --git a/src/systemd/sd-varlink-idl.h b/src/systemd/sd-varlink-idl.h index fe65c00eb68..63d79d33f7b 100644 --- a/src/systemd/sd-varlink-idl.h +++ b/src/systemd/sd-varlink-idl.h @@ -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) diff --git a/src/sysupdate/updatectl.c b/src/sysupdate/updatectl.c index 6cb7c6fbf19..53ccc59a7f0 100644 --- a/src/sysupdate/updatectl.c +++ b/src/sysupdate/updatectl.c @@ -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 */ diff --git a/src/test/test-label.c b/src/test/test-label.c index 06690ec86c9..cac6cc0f50b 100644 --- a/src/test/test-label.c +++ b/src/test/test-label.c @@ -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"); diff --git a/src/test/test-mempool.c b/src/test/test-mempool.c index 1f071dba05a..b8f139ca303 100644 --- a/src/test/test-mempool.c +++ b/src/test/test-mempool.c @@ -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); diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c index 2b44905346e..fbfb3990e42 100644 --- a/src/test/test-string-util.c +++ b/src/test/test-string-util.c @@ -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)); diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 3fa0cbba614..71424056575 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -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);