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

Commit 64c9af5

Browse files
authored
Merge pull request #9 from alfred-ai/patch-1
Minor ram reduction (52 bytes)
2 parents 57c874c + 145f7dc commit 64c9af5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ccronexpr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050

5151
#define CRON_INVALID_INSTANT ((time_t) -1)
5252

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

5858
#define CRON_MAX_STR_LEN_TO_SPLIT 256
@@ -620,7 +620,7 @@ static char** split_str(const char* str, char del, size_t* len_out) {
620620
return NULL;
621621
}
622622

623-
static char* replace_ordinals(char* value, const char** arr, size_t arr_len) {
623+
static char* replace_ordinals(char* value, const char* const * arr, size_t arr_len) {
624624
size_t i;
625625
char* cur = value;
626626
char* res = NULL;

0 commit comments

Comments
 (0)