From aff91f79aee2091eb2c92c679b09d4ba5496a865 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 25 Sep 2011 03:31:39 +0200 Subject: [PATCH] cygwin: fix return of uninitialized variable --- src/platform_cygwin.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform_cygwin.cc b/src/platform_cygwin.cc index f8cc0091b6..955046e5d6 100644 --- a/src/platform_cygwin.cc +++ b/src/platform_cygwin.cc @@ -347,6 +347,8 @@ double Platform::GetUptime() { char line[512]; FILE *fpUptime = fopen("/proc/uptime", "r"); + amount = 0; + if (fpUptime) { if (fgets(line, 511, fpUptime) != NULL) { sscanf(line, "%lf %*lf", &amount);