Browse Source

cygwin: fix return of uninitialized variable

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

2
src/platform_cygwin.cc

@ -340,6 +340,8 @@ double Platform::GetUptimeImpl() {
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