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 f9fec3a commit aff91f79aee2091eb2c92c679b09d4ba5496a865
Showing with 2 additions and 0 deletions.
  1. +2 −0 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);

0 comments on commit aff91f7

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