diff --git a/misc/ifstat.c b/misc/ifstat.c index 1cd55c48..7d33f5e3 100644 --- a/misc/ifstat.c +++ b/misc/ifstat.c @@ -708,7 +708,7 @@ int main(int argc, char *argv[]) } if (!ignore_history) { FILE *tfp; - long uptime; + long uptime = -1; if ((tfp = fopen("/proc/uptime", "r")) != NULL) { if (fscanf(tfp, "%ld", &uptime) != 1) uptime = -1; diff --git a/misc/nstat.c b/misc/nstat.c index 4f73c628..2f06ffdd 100644 --- a/misc/nstat.c +++ b/misc/nstat.c @@ -560,7 +560,7 @@ int main(int argc, char *argv[]) } if (!ignore_history) { FILE *tfp; - long uptime; + long uptime = -1; if ((tfp = fopen("/proc/uptime", "r")) != NULL) { if (fscanf(tfp, "%ld", &uptime) != 1) uptime = -1; diff --git a/misc/rtacct.c b/misc/rtacct.c index ab8fdbb8..49168bdd 100644 --- a/misc/rtacct.c +++ b/misc/rtacct.c @@ -580,7 +580,7 @@ int main(int argc, char *argv[]) if (!ignore_history) { FILE *tfp; - long uptime; + long uptime = -1; if ((tfp = fopen("/proc/uptime", "r")) != NULL) { if (fscanf(tfp, "%ld", &uptime) != 1) uptime = -1;