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:
f9fec3a
)
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:59:50 +0000
(
03:59
+0200)
src/platform_cygwin.cc
patch
|
blob
|
history
diff --git
a/src/platform_cygwin.cc
b/src/platform_cygwin.cc
index
f8cc009
..
955046e
100644
(file)
--- a/
src/platform_cygwin.cc
+++ b/
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);