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))),
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))),
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);
}
/**
* 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.
#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);
}
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
}