|
@@ -1,5 +1,5 @@
|
|
/*
|
|
/*
|
|
- * SPDX-FileCopyrightText: 2022 Helmut Pozimski <helmut@pozimski.eu>
|
|
|
|
|
|
+ * SPDX-FileCopyrightText: 2022-2023 Helmut Pozimski <helmut@pozimski.eu>
|
|
*
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-only
|
|
* SPDX-License-Identifier: GPL-2.0-only
|
|
*/
|
|
*/
|
|
@@ -21,7 +21,7 @@ static void format_date(struct tm* datetime, char* output) {
|
|
snprintf(output, 9, "%.4s%.2s%.2s", year, month, day);
|
|
snprintf(output, 9, "%.4s%.2s%.2s", year, month, day);
|
|
}
|
|
}
|
|
|
|
|
|
-esp_err_t storage_init(char* name) {
|
|
|
|
|
|
+esp_err_t storage_init(const char* name) {
|
|
return nvs_open(name, NVS_READWRITE, &handle);
|
|
return nvs_open(name, NVS_READWRITE, &handle);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -51,7 +51,7 @@ esp_err_t delete_wakeup_time_str(const char* key) {
|
|
return ret | nvs_commit(handle);
|
|
return ret | nvs_commit(handle);
|
|
}
|
|
}
|
|
|
|
|
|
-void delete_outdated_entries(struct tm* datetime, char* namespace) {
|
|
|
|
|
|
+void delete_outdated_entries(struct tm* datetime, const char* namespace) {
|
|
char reference_date_str[9];
|
|
char reference_date_str[9];
|
|
format_date(datetime, reference_date_str);
|
|
format_date(datetime, reference_date_str);
|
|
int reference_date = atoi(reference_date_str);
|
|
int reference_date = atoi(reference_date_str);
|