From e2c8436e17b7cadc8f39493c881c91541669bc7a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sun, 29 Jun 2014 11:22:44 +0200 Subject: [PATCH] warc: Avoid out-of-scope variable usage --- src/ChangeLog | 4 ++++ src/warc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 75813acc..1e144956 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-06-29 Giuseppe Scrivano + + * warc.c (warc_write_date_header): Avoid out-of-scope variable usage. + 2014-06-28 Giuseppe Scrivano * Makefile.am (wget_SOURCES): Remove space-tab indentation. diff --git a/src/warc.c b/src/warc.c index 34613ec3..46459acd 100644 --- a/src/warc.c +++ b/src/warc.c @@ -386,9 +386,9 @@ warc_write_end_record (void) static bool warc_write_date_header (const char *timestamp) { + char current_timestamp[21]; if (timestamp == NULL) { - char current_timestamp[21]; warc_timestamp (current_timestamp); timestamp = current_timestamp; }