Skip to content

Commit aff91f7

Browse files
committed
cygwin: fix return of uninitialized variable
1 parent f9fec3a commit aff91f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/platform_cygwin.cc

+2
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ double Platform::GetUptime() {
347347
char line[512];
348348
FILE *fpUptime = fopen("/proc/uptime", "r");
349349

350+
amount = 0;
351+
350352
if (fpUptime) {
351353
if (fgets(line, 511, fpUptime) != NULL) {
352354
sscanf(line, "%lf %*lf", &amount);

0 commit comments

Comments
 (0)