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 7eb806e..7e468e2 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;