summaryrefslogtreecommitdiff
path: root/libmisc/strtoday.c
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2022-08-20 18:17:16 +0200
committerBalint Reczey <balint@balintreczey.hu>2022-08-20 18:17:16 +0200
commit675b462b64b213647d0f5c56b1e8440be5890c8a (patch)
tree1cd63eec7594d03a622575136c61d8c813f59503 /libmisc/strtoday.c
parent0c04b92a9afe5e09a20307d8a5ec98d97ed00f47 (diff)
downloadshadow-675b462b64b213647d0f5c56b1e8440be5890c8a.tar.gz
New upstream version 4.12.2+dfsg1
Diffstat (limited to 'libmisc/strtoday.c')
-rw-r--r--libmisc/strtoday.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmisc/strtoday.c b/libmisc/strtoday.c
index 7a60ea3d..d3218738 100644
--- a/libmisc/strtoday.c
+++ b/libmisc/strtoday.c
@@ -96,7 +96,7 @@ long strtoday (const char *str)
* for now we allow just one format, but we can define more later
* (we try them all until one succeeds). --marekm
*/
-static char *date_formats[] = {
+static const char *const date_formats[] = {
"%Y-%m-%d",
(char *) 0
};
@@ -106,12 +106,12 @@ static char *date_formats[] = {
* current month, and the cumulative number of days in the preceding
* months. they are declared so that january is 1, not 0.
*/
-static short days[13] = { 0,
+static const short days[13] = { 0,
31, 28, 31, 30, 31, 30, /* JAN - JUN */
31, 31, 30, 31, 30, 31
}; /* JUL - DEC */
-static short juldays[13] = { 0,
+static const short juldays[13] = { 0,
0, 31, 59, 90, 120, 151, /* JAN - JUN */
181, 212, 243, 273, 304, 334
}; /* JUL - DEC */
@@ -129,7 +129,7 @@ long strtoday (const char *str)
{
#ifdef HAVE_STRPTIME
struct tm tp;
- char *const *fmt;
+ const char *const *fmt;
char *cp;
time_t result;