diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-10-05 09:11:14 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-10-06 12:37:06 +0200 |
commit | 162c6aebddbe2d79d4b435b959d2285c1543de42 (patch) | |
tree | 3ac2d15a851cdfe7591892ad12c54fdf48dc4afc /src/utils.c | |
parent | 59e006e56d9f893506af56a4ca114fe53b537e49 (diff) | |
download | calcurse-162c6aebddbe2d79d4b435b959d2285c1543de42.zip |
src/utils.c: Mark input string of parse_date() const
We don't mess about with the date string here, so it should be declared
const.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils.c b/src/utils.c index ac7706c..398233c 100644 --- a/src/utils.c +++ b/src/utils.c @@ -608,11 +608,11 @@ new_tempfile (const char *prefix, int trailing_len) * Returns 1 if sucessfully converted or 0 if the string is an invalid date. */ int -parse_date (char *date_string, enum datefmt datefmt, int *year, int *month, - int *day, struct date *slctd_date) +parse_date (const char *date_string, enum datefmt datefmt, int *year, + int *month, int *day, struct date *slctd_date) { - char sep = (datefmt == DATEFMT_ISO) ? '-' : '/'; - char *p; + const char sep = (datefmt == DATEFMT_ISO) ? '-' : '/'; + const char *p; int in[3] = {0, 0, 0}, n = 0; int d, m, y; |