Browse Source

cygwin: fix return of uninitialized variable

v0.7.4-release
Ben Noordhuis 13 years ago
parent
commit
aff91f79ae
  1. 2
      src/platform_cygwin.cc

2
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);

Loading…
Cancel
Save