Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

cygwin: fix return of uninitialized variable

  • Loading branch information...
bnoordhuis committed Sep 25, 2011
1 parent d157131 commit 6ee676c0e45556f3bf88516dfabfe015c4273f15
Showing with 2 additions and 0 deletions.
  1. +2 −0 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);

0 comments on commit 6ee676c

Please sign in to comment.
You can’t perform that action at this time.