Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
cygwin: fix return of uninitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Sep 25, 2011
1 parent f9fec3a commit aff91f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platform_cygwin.cc
Expand Up @@ -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);
Expand Down

0 comments on commit aff91f7

Please sign in to comment.