summaryrefslogtreecommitdiff
path: root/tests/fs-tests/stress
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fs-tests/stress')
-rw-r--r--tests/fs-tests/stress/atoms/pdfrun.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/fs-tests/stress/atoms/pdfrun.c b/tests/fs-tests/stress/atoms/pdfrun.c
index 3536580..46c70e1 100644
--- a/tests/fs-tests/stress/atoms/pdfrun.c
+++ b/tests/fs-tests/stress/atoms/pdfrun.c
@@ -40,8 +40,11 @@ void adjust_size(void)
total_memory = 0;
f = fopen("/proc/meminfo", "r");
- fscanf(f, "%s %lu", dummy, &total_memory);
+ if (fscanf(f, "%s %lu", dummy, &total_memory) != 2)
+ perror("fscanf error");
fclose(f);
+
+
if (total_memory > 0 && tests_size_parameter > total_memory / 2)
tests_size_parameter = total_memory / 2;
}