Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Minor ram reduction (52 bytes) #9

Merged
merged 1 commit into from
May 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ccronexpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@

#define CRON_INVALID_INSTANT ((time_t) -1)

static const char* DAYS_ARR[] = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
static const char* const DAYS_ARR[] = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
#define CRON_DAYS_ARR_LEN 7
static const char* MONTHS_ARR[] = { "FOO", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
static const char* const MONTHS_ARR[] = { "FOO", "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
#define CRON_MONTHS_ARR_LEN 13

#define CRON_MAX_STR_LEN_TO_SPLIT 256
Expand Down Expand Up @@ -620,7 +620,7 @@ static char** split_str(const char* str, char del, size_t* len_out) {
return NULL;
}

static char* replace_ordinals(char* value, const char** arr, size_t arr_len) {
static char* replace_ordinals(char* value, const char* const * arr, size_t arr_len) {
size_t i;
char* cur = value;
char* res = NULL;
Expand Down