chiark / gitweb /
mount_cgroup_controllers: expect 2 items from fscanf()
authorKay Sievers <kay.sievers@vrfy.org>
Mon, 22 Nov 2010 10:06:38 +0000 (11:06 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 22 Nov 2010 10:06:38 +0000 (11:06 +0100)
src/mount-setup.c

index 7eb806e7fd8588d3d7fa23965716f130448e0576..7e468e2728bab9f51b29bdf9f6e604bcd6d8f091 100644 (file)
@@ -140,7 +140,7 @@ static int mount_cgroup_controllers(void) {
                 char *controller, *where;
                 int enabled = false;
 
-                if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 1) {
+                if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) {
 
                         if (feof(f))
                                 break;