cygwin: fix return of uninitialized variable

This commit is contained in:
Ben Noordhuis committed 2011-09-25 03:59:50 +02:00
1 parent f9fec3a2d6
commit aff91f79ae
1 file changed
+2
+2
View File
@@ -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);