mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
cygwin: fix return of uninitialized variable
This commit is contained in:
1 parent
f9fec3a2d6
commit
aff91f79ae
1 file changed
+2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user