summaryrefslogtreecommitdiffstats
path: root/netem
diff options
context:
space:
mode:
Diffstat (limited to 'netem')
-rw-r--r--netem/maketable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/netem/maketable.c b/netem/maketable.c
index 6aff927b..ad660e7d 100644
--- a/netem/maketable.c
+++ b/netem/maketable.c
@@ -24,8 +24,8 @@ readdoubles(FILE *fp, int *number)
int limit;
int n=0, i;
- fstat(fileno(fp), &info);
- if (info.st_size > 0) {
+ if (!fstat(fileno(fp), &info) &&
+ info.st_size > 0) {
limit = 2*info.st_size/sizeof(double); /* @@ approximate */
} else {
limit = 10000;