Commit 664b9baf authored by Steve Holme's avatar Steve Holme
Browse files

parsedate.c: Fixed compilation warning

parsedate.c:548: warning: 'parsed' may be used uninitialized in this
                 function

As curl_getdate() returns -1 when parsedate() fails we can initialise
parsed to -1.
parent cd6c13c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -545,7 +545,7 @@ static int parsedate(const char *date, time_t *output)

time_t curl_getdate(const char *p, const time_t *now)
{
  time_t parsed;
  time_t parsed = -1;
  int rc = parsedate(p, &parsed);
  (void)now; /* legacy argument from the past that we ignore */