]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
spelling: arithmetics
authorJosh Soref <jsoref@users.noreply.github.com>
Sun, 13 Jun 2021 21:31:58 +0000 (17:31 -0400)
committerWillem Toorop <willem@nlnetlabs.nl>
Mon, 14 Jun 2021 09:29:17 +0000 (11:29 +0200)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
examples/ldns-rrsig.c
host2str.c
ldns/util.h.in
util.c

index 78b55b91ef5ede0b8bca1ca5f02713594f83fc25..9b7aac4376344b2f65b162a7a926a3f68c0e2def 100644 (file)
@@ -180,7 +180,7 @@ main(int argc, char *argv[])
                        
                        for(i = 0; i < ldns_rr_list_rr_count(rrsig_type); i++) {
                                memset(&incep, 0, sizeof(incep));
-                               if (ldns_serial_arithmitics_gmtime_r(
+                               if (ldns_serial_arithmetics_gmtime_r(
                                                ldns_rdf2native_time_t(
                                                ldns_rr_rrsig_inception(
                                                ldns_rr_list_rr(rrsig_type, i))),
@@ -192,7 +192,7 @@ main(int argc, char *argv[])
                                        incep_buf[0] = '\0';
                                }
                                memset(&expir, 0, sizeof(expir));
-                               if (ldns_serial_arithmitics_gmtime_r(
+                               if (ldns_serial_arithmetics_gmtime_r(
                                                ldns_rdf2native_time_t(
                                                ldns_rr_rrsig_expiration(
                                                ldns_rr_list_rr(rrsig_type, i))),
index f8ff966f06102f5c205fbb6ae40694a5f0799788..3765bcb41e66f3ee336462b97612397ebbfc275a 100644 (file)
@@ -418,7 +418,7 @@ ldns_rdf2buffer_str_time(ldns_buffer *output, const ldns_rdf *rdf)
        char date_buf[16];
 
        memset(&tm, 0, sizeof(tm));
-       if (ldns_serial_arithmitics_gmtime_r(ldns_rdf2native_int32(rdf), time(NULL), &tm)
+       if (ldns_serial_arithmetics_gmtime_r(ldns_rdf2native_int32(rdf), time(NULL), &tm)
            && strftime(date_buf, 15, "%Y%m%d%H%M%S", &tm)) {
                ldns_buffer_printf(output, "%s", date_buf);
        }
index 514fcf3bb434d025c59baf49e232420648e8b736..f02a390088bc79968e8f786acb44b9078b8aaa25 100644 (file)
@@ -274,19 +274,19 @@ time_t mktime_from_utc(const struct tm *tm);
 
 /**
  * The function interprets time as the number of seconds since epoch
- * with respect to now using serial arithmitics (rfc1982).
+ * with respect to now using serial arithmetics (rfc1982).
  * That number of seconds is then converted to broken-out time information.
  * This is especially useful when converting the inception and expiration
  * fields of RRSIG records.
  *
  * \param[in] time number of seconds since epoch (midnight, January 1st, 1970)
- *            to be intepreted as a serial arithmitics number relative to now.
+ *            to be intepreted as a serial arithmetics number relative to now.
  * \param[in] now number of seconds since epoch (midnight, January 1st, 1970)
  *            to which the time value is compared to determine the final value.
  * \param[out] result the struct with the broken-out time information
  * \return result on success or NULL on error
  */
-struct tm * ldns_serial_arithmitics_gmtime_r(int32_t time, time_t now, struct tm *result);
+struct tm * ldns_serial_arithmetics_gmtime_r(int32_t time, time_t now, struct tm *result);
  
 /**
  * Seed the random function.
diff --git a/util.c b/util.c
index 073bcaf14ded95bdbc8fa13ca4543daab24e14e2..b622f3fe856b1e2b17ca40e6c154310189d42aad 100644 (file)
--- a/util.c
+++ b/util.c
@@ -293,7 +293,7 @@ ldns_gmtime64_r(int64_t clock, struct tm *result)
 #endif /* SIZEOF_TIME_T <= 4 */
 
 static int64_t
-ldns_serial_arithmitics_time(int32_t time, time_t now)
+ldns_serial_arithmetics_time(int32_t time, time_t now)
 {
        /* Casting due to https://github.com/NLnetLabs/ldns/issues/71 */
        int32_t offset = (int32_t) ((uint32_t) time - (uint32_t) now);
@@ -301,13 +301,13 @@ ldns_serial_arithmitics_time(int32_t time, time_t now)
 }
 
 struct tm *
-ldns_serial_arithmitics_gmtime_r(int32_t time, time_t now, struct tm *result)
+ldns_serial_arithmetics_gmtime_r(int32_t time, time_t now, struct tm *result)
 {
 #if SIZEOF_TIME_T <= 4
-       int64_t secs_since_epoch = ldns_serial_arithmitics_time(time, now);
+       int64_t secs_since_epoch = ldns_serial_arithmetics_time(time, now);
        return  ldns_gmtime64_r(secs_since_epoch, result);
 #else
-       time_t  secs_since_epoch = ldns_serial_arithmitics_time(time, now);
+       time_t  secs_since_epoch = ldns_serial_arithmetics_time(time, now);
        return  gmtime_r(&secs_since_epoch, result);
 #endif
 }