summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-08-02 02:43:38 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-08-02 02:43:38 +0900
commit5162b2a1c4fa35ea4c7abdd075f9a4df13ea4f0e (patch)
treee1e063fefc38d5d1853aaff7563006e0ba3ba266 /src
parentbc4b9a7117b617341231be703b2ea3d0639ee9bf (diff)
downloadsystemd-5162b2a1c4fa35ea4c7abdd075f9a4df13ea4f0e.tar.gz
tree-wide: fix typo
Diffstat (limited to 'src')
-rw-r--r--src/basic/math-util.h2
-rw-r--r--src/resolve/resolved-dns-transaction.c2
-rw-r--r--src/sleep/sleep.c2
-rw-r--r--src/test/test-copy.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/math-util.h b/src/basic/math-util.h
index 125e0c6209..24023cd2be 100644
--- a/src/basic/math-util.h
+++ b/src/basic/math-util.h
@@ -9,6 +9,6 @@
* The argument must be a floating point, i.e. one of float, double, or long double. */
#define iszero_safe(x) (fpclassify(x) == FP_ZERO)
-/* To avoid x == y and triggering compile warning -Wfloat-equal. This retuns false if one of the argument is
+/* To avoid x == y and triggering compile warning -Wfloat-equal. This returns false if one of the argument is
* NaN or infinity. One of the argument must be a floating point. */
#define fp_equal(x, y) iszero_safe((x) - (y))
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
index 47af540338..328913e1da 100644
--- a/src/resolve/resolved-dns-transaction.c
+++ b/src/resolve/resolved-dns-transaction.c
@@ -1920,7 +1920,7 @@ static int dns_transaction_make_packet_mdns(DnsTransaction *t) {
ancount = be16toh(DNS_PACKET_HEADER(p)->ancount);
}
- /* Then, create acctual packet. */
+ /* Then, create actual packet. */
p = dns_packet_unref(p);
r = dns_packet_new_query(&p, t->scope->protocol, 0, false);
if (r < 0)
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index a1905dbc27..ff6c71d61b 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -304,7 +304,7 @@ static int execute_s2h(const SleepConfig *sleep_config) {
assert(previous_discharge_rate != 0);
suspend_interval = usec_sub_unsigned(last_capacity * USEC_PER_HOUR / previous_discharge_rate, 30 * USEC_PER_MINUTE);
/* The previous discharge rate is stored in per hour basis so converted to minutes.
- * Substracted 30 minutes from the result to keep a buffer of 30 minutes before battery gets critical */
+ * Subtracted 30 minutes from the result to keep a buffer of 30 minutes before battery gets critical */
}
log_debug("Set timerfd wake alarm for %s", FORMAT_TIMESPAN(suspend_interval, USEC_PER_SEC));
/* Wake alarm for system with or without battery to hibernate or estimate discharge rate whichever is applicable */
diff --git a/src/test/test-copy.c b/src/test/test-copy.c
index 09e78b920e..4091b425d1 100644
--- a/src/test/test-copy.c
+++ b/src/test/test-copy.c
@@ -66,7 +66,7 @@ TEST(copy_tree_replace_file) {
assert_se(write_string_file(src, "bar bar", WRITE_STRING_FILE_CREATE) == 0);
assert_se(write_string_file(dst, "foo foo foo", WRITE_STRING_FILE_CREATE) == 0);
- /* The file exists- now overwite original contents, and test the COPY_REPLACE flag. */
+ /* The file exists- now overwrite original contents, and test the COPY_REPLACE flag. */
assert_se(copy_tree(src, dst, UID_INVALID, GID_INVALID, COPY_REFLINK) == -EEXIST);