From f21f31b24be27c8eb245d47507b0f482929c5b08 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sun, 30 Sep 2018 21:20:08 +0200 Subject: [PATCH] trivial: fix spelling in code comments Based-on-patch-by: Rafael Fontenelle --- src/basic/env-util.c | 4 ++-- src/basic/hashmap.h | 2 +- src/basic/hexdecoct.c | 4 ++-- src/basic/parse-util.c | 2 +- src/basic/path-util.c | 2 +- src/basic/process-util.c | 2 +- src/basic/time-util.c | 2 +- src/libsystemd-network/sd-dhcp-client.c | 2 +- src/libsystemd-network/sd-lldp.c | 2 +- src/libsystemd/sd-event/sd-event.c | 6 +++--- src/shared/dns-domain.c | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/basic/env-util.c b/src/basic/env-util.c index a784a30e1d0..3b8130b03e4 100644 --- a/src/basic/env-util.c +++ b/src/basic/env-util.c @@ -114,7 +114,7 @@ bool strv_env_is_valid(char **e) { if (!env_assignment_is_valid(*p)) return false; - /* Check if there are duplicate assginments */ + /* Check if there are duplicate assignments */ k = strcspn(*p, "="); STRV_FOREACH(q, p + 1) if (strneq(*p, *q, k) && (*q)[k] == '=') @@ -388,7 +388,7 @@ int strv_env_replace(char ***l, char *p) { assert(p); /* Replace first occurrence of the env var or add a new one in the - * string list. Drop other occurences. Edits in-place. Does not copy p. + * string list. Drop other occurrences. Edits in-place. Does not copy p. * p must be a valid key=value assignment. */ diff --git a/src/basic/hashmap.h b/src/basic/hashmap.h index 274afb395c2..b771ceccdc6 100644 --- a/src/basic/hashmap.h +++ b/src/basic/hashmap.h @@ -15,7 +15,7 @@ * necessary to instantiate an object for each Hashmap use. * * If ENABLE_DEBUG_HASHMAP is defined (by configuring with --enable-debug=hashmap), - * the implemention will: + * the implementation will: * - store extra data for debugging and statistics (see tools/gdb-sd_dump_hashmaps.py) * - perform extra checks for invalid use of iterators */ diff --git a/src/basic/hexdecoct.c b/src/basic/hexdecoct.c index 7748e8352cd..3b80a03fa17 100644 --- a/src/basic/hexdecoct.c +++ b/src/basic/hexdecoct.c @@ -79,7 +79,7 @@ static int unhex_next(const char **p, size_t *l) { assert(l); /* Find the next non-whitespace character, and decode it. We - * greedily skip all preceeding and all following whitespace. */ + * greedily skip all preceding and all following whitespace. */ for (;;) { if (*l == 0) @@ -647,7 +647,7 @@ static int unbase64_next(const char **p, size_t *l) { assert(l); /* Find the next non-whitespace character, and decode it. If we find padding, we return it as INT_MAX. We - * greedily skip all preceeding and all following whitespace. */ + * greedily skip all preceding and all following whitespace. */ for (;;) { if (*l == 0) diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c index db38f91c832..a9085348b55 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c @@ -570,7 +570,7 @@ int parse_fractional_part_u(const char **p, size_t digits, unsigned *res) { s = *p; - /* accept any number of digits, strtoull is limted to 19 */ + /* accept any number of digits, strtoull is limited to 19 */ for (i=0; i < digits; i++,s++) { if (*s < '0' || *s > '9') { if (i == 0) diff --git a/src/basic/path-util.c b/src/basic/path-util.c index b62786f27e6..f3c6c16aae5 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -425,7 +425,7 @@ int path_compare(const char *a, const char *b) { assert(a); assert(b); - /* A relative path and an abolute path must not compare as equal. + /* A relative path and an absolute path must not compare as equal. * Which one is sorted before the other does not really matter. * Here a relative path is ordered before an absolute path. */ d = (a[0] == '/') - (b[0] == '/'); diff --git a/src/basic/process-util.c b/src/basic/process-util.c index c887f9708b3..1098cf453f6 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -425,7 +425,7 @@ int is_kernel_thread(pid_t pid) { q += l; } - /* Skip preceeding whitespace */ + /* Skip preceding whitespace */ l = strspn(q, WHITESPACE); if (l < 1) return -EINVAL; diff --git a/src/basic/time-util.c b/src/basic/time-util.c index 81d3f3f38f7..9ac739b42ad 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -905,7 +905,7 @@ int parse_timestamp(const char *t, usec_t *usec) { * Otherwise just cut it off. */ with_tz = !STR_IN_SET(tz, tzname[0], tzname[1]); - /* Cut off the timezone if we dont need it. */ + /* Cut off the timezone if we don't need it. */ if (with_tz) t = strndupa(t, last_space - t); diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 0995f091f5d..3e8d985aa73 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -698,7 +698,7 @@ static int client_message_init( let the server know how large the server may make its DHCP messages. Note (from ConnMan): Some DHCP servers will send bigger DHCP packets - than the defined default size unless the Maximum Messge Size option + than the defined default size unless the Maximum Message Size option is explicitly set RFC3442 "Requirements to Avoid Sizing Constraints": diff --git a/src/libsystemd-network/sd-lldp.c b/src/libsystemd-network/sd-lldp.c index e60aebc6277..f72ef204b91 100644 --- a/src/libsystemd-network/sd-lldp.c +++ b/src/libsystemd-network/sd-lldp.c @@ -119,7 +119,7 @@ static int lldp_add_neighbor(sd_lldp *lldp, sd_lldp_neighbor *n) { } if (lldp_neighbor_equal(n, old)) { - /* Is this equal, then restart the TTL counter, but don't do anyting else. */ + /* Is this equal, then restart the TTL counter, but don't do anything else. */ old->timestamp = n->timestamp; lldp_start_timer(lldp, old); lldp_callback(lldp, SD_LLDP_EVENT_REFRESHED, old); diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 202e9eab163..880e127686f 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -950,7 +950,7 @@ static void source_disconnect(sd_event_source *s) { * continued to being watched. That's because inotify doesn't really have an API for that: we * can only change watch masks with access to the original inode either by fd or by path. But * paths aren't stable, and keeping an O_PATH fd open all the time would mean wasting an fd - * continously and keeping the mount busy which we can't really do. We could reconstruct the + * continuously and keeping the mount busy which we can't really do. We could reconstruct the * original inode from /proc/self/fdinfo/$INOTIFY_FD (as all watch descriptors are listed * there), but given the need for open_by_handle_at() which is privileged and not universally * available this would be quite an incomplete solution. Hence we go the other way, leave the @@ -1130,7 +1130,7 @@ static void initialize_perturb(sd_event *e) { sd_id128_t bootid = {}; /* When we sleep for longer, we try to realign the wakeup to - the same time wihtin each minute/second/250ms, so that + the same time within each minute/second/250ms, so that events all across the system can be coalesced into a single CPU wakeup. However, let's take some system-specific randomness for this value, so that in a network of systems @@ -1746,7 +1746,7 @@ static uint32_t inode_data_determine_mask(struct inode_data *d) { * * Note that we add all sources to the mask here, regardless whether enabled, disabled or oneshot. That's * because we cannot change the mask anymore after the event source was created once, since the kernel has no - * API for that. Hence we need to subscribe to the maximum mask we ever might be interested in, and supress + * API for that. Hence we need to subscribe to the maximum mask we ever might be interested in, and suppress * events we don't care for client-side. */ LIST_FOREACH(inotify.by_inode_data, s, d->event_sources) { diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c index 1ecfb77de27..f24edf57918 100644 --- a/src/shared/dns-domain.c +++ b/src/shared/dns-domain.c @@ -1284,7 +1284,7 @@ int dns_name_apply_idna(const char *name, char **ret) { log_debug("idn2_lookup_u8(\"%s\") failed: %d/%s", name, r, idn2_strerror(r)); if (r == IDN2_2HYPHEN) - /* The name has two hypens — forbidden by IDNA2008 in some cases */ + /* The name has two hyphens — forbidden by IDNA2008 in some cases */ return 0; if (IN_SET(r, IDN2_TOO_BIG_DOMAIN, IDN2_TOO_BIG_LABEL)) return -ENOSPC;