trivial: fix spelling in code comments

Based-on-patch-by: Rafael Fontenelle <rafaelff@gnome.org>
This commit is contained in:
Thomas Haller 2018-09-30 21:20:08 +02:00 committed by Yu Watanabe
parent 213e759ad5
commit f21f31b24b
11 changed files with 15 additions and 15 deletions

View File

@ -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.
*/

View File

@ -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
*/

View File

@ -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)

View File

@ -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)

View File

@ -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] == '/');

View File

@ -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;

View File

@ -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);

View File

@ -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":

View File

@ -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);

View File

@ -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) {

View File

@ -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;