projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d157131
)
cygwin: fix return of uninitialized variable
author
Ben Noordhuis
<info@bnoordhuis.nl>
Sun, 25 Sep 2011 01:31:39 +0000
(
03:31
+0200)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Sun, 25 Sep 2011 01:34:12 +0000
(
03:34
+0200)
src/platform_cygwin.cc
patch
|
blob
|
history
diff --git
a/src/platform_cygwin.cc
b/src/platform_cygwin.cc
index
b014e95
..
f7b4933
100644
(file)
--- a/
src/platform_cygwin.cc
+++ b/
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);