mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
add_date_to_string: Let last two parameters point to const.
This commit is contained in:
parent
8c66e34323
commit
8b8ff255bd
@ -240,7 +240,8 @@ add_timeval_to_string(struct string *string, timeval_T *timeval)
|
||||
|
||||
#ifdef HAVE_STRFTIME
|
||||
struct string *
|
||||
add_date_to_string(struct string *string, unsigned char *fmt, time_t *date)
|
||||
add_date_to_string(struct string *string, const unsigned char *fmt,
|
||||
const time_t *date)
|
||||
{
|
||||
unsigned char buffer[MAX_STR_LEN];
|
||||
time_t when_time = date ? *date : time(NULL);
|
||||
|
@ -53,7 +53,9 @@ struct string *add_timeval_to_string(struct string *string, timeval_T *timeval);
|
||||
#ifdef HAVE_STRFTIME
|
||||
/* Uses strftime() to add @fmt time format to @string. If @time is NULL
|
||||
* time(NULL) will be used. */
|
||||
struct string *add_date_to_string(struct string *string, unsigned char *format, time_t *time);
|
||||
struct string *add_date_to_string(struct string *string,
|
||||
const unsigned char *format,
|
||||
const time_t *time);
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user