about summary refs log tree commit diff
path: root/support/test-container.c
diff options
context:
space:
mode:
Diffstat (limited to 'support/test-container.c')
-rw-r--r--support/test-container.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/test-container.c b/support/test-container.c
index d4ca41fe7c..008ced2d25 100644
--- a/support/test-container.c
+++ b/support/test-container.c
@@ -714,8 +714,8 @@ check_for_unshare_hints (int require_pidns)
         continue;
 
       val = -1; /* Sentinel.  */
-      fscanf (f, "%d", &val);
-      if (val != files[i].bad_value)
+      int cnt = fscanf (f, "%d", &val);
+      if (cnt == 1 && val != files[i].bad_value)
 	continue;
 
       printf ("To enable test-container, please run this as root:\n");