1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #21096 from benpicco/rtc_mktime-const

sys/rtc_utils: make parameter to `rtc_mktime()` const
This commit is contained in:
Marian Buschsieweke 2024-12-19 14:29:20 +00:00 committed by GitHub
commit 4f55461e15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

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

View File

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