Suppress "discarding const" warning.

Change-Id: I5f97b70d7f423cb5b7792863fb2bd07516aa1951
Reviewed-on: https://code.wireshark.org/review/18375
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-10-21 20:46:48 -07:00
parent 321b756dc4
commit d16295bc9b
1 changed files with 5 additions and 3 deletions

View File

@ -247,13 +247,15 @@ write_pdml_preamble(FILE *fh, const gchar *filename)
{
time_t t = time(NULL);
struct tm * timeinfo;
char *ts;
char *fmt_ts;
const char *ts;
/* Create the output */
timeinfo = localtime(&t);
if (timeinfo != NULL) {
ts = asctime(timeinfo);
ts[strlen(ts)-1] = 0; /* overwrite \n */
fmt_ts = asctime(timeinfo);
fmt_ts[strlen(fmt_ts)-1] = 0; /* overwrite \n */
ts = fmt_ts;
} else
ts = "Not representable";