From ba0060d3a6a6907422c03ba51641b07a6afd62db Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 18 Dec 2024 22:08:32 +0100 Subject: [PATCH] sys/rtc_utils: make parameter to rtc_mktime() const --- sys/include/rtc_utils.h | 2 +- sys/rtc_utils/rtc_utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/include/rtc_utils.h b/sys/include/rtc_utils.h index cd9d197bd0cb..88a983502ab7 100644 --- a/sys/include/rtc_utils.h +++ b/sys/include/rtc_utils.h @@ -69,7 +69,7 @@ int rtc_tm_compare(const struct tm *a, const struct tm *b); * * @return elapsed seconds since `RIOT_EPOCH` */ -uint32_t rtc_mktime(struct tm *t); +uint32_t rtc_mktime(const struct tm *t); /** * @brief Converts an RTC timestamp into a time struct. diff --git a/sys/rtc_utils/rtc_utils.c b/sys/rtc_utils/rtc_utils.c index 6c1c792179c3..4c2c10a66144 100644 --- a/sys/rtc_utils/rtc_utils.c +++ b/sys/rtc_utils/rtc_utils.c @@ -177,7 +177,7 @@ void rtc_tm_normalize(struct tm *t) #endif } -uint32_t rtc_mktime(struct tm *t) +uint32_t rtc_mktime(const struct tm *t) { unsigned year = t->tm_year + 1900; uint32_t time = t->tm_sec