]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfsng: append_null_to_list()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 16:08:58 +0000 (17:08 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Feb 2018 14:48:10 +0000 (15:48 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 514fb406026372e8921f99ce6bcf65e17d85c905..856da3266f13417a9b29569a0dfe889b63a90396 100644 (file)
@@ -206,18 +206,18 @@ static void *must_alloc(size_t sz)
        return must_realloc(NULL, sz);
 }
 
-/*
- * Given a pointer to a null-terminated array of pointers, realloc to
- * add one entry, and point the new entry to NULL.  Do not fail.  Return
- * the index to the second-to-last entry - that is, the one which is
- * now available for use (keeping the list null-terminated).
+/* Given a pointer to a null-terminated array of pointers, realloc to add one
+ * entry, and point the new entry to NULL. Do not fail. Return the index to the
+ * second-to-last entry - that is, the one which is now available for use
+ * (keeping the list null-terminated).
  */
 static int append_null_to_list(void ***list)
 {
        int newentry = 0;
 
        if (*list)
-               for (; (*list)[newentry]; newentry++);
+               for (; (*list)[newentry]; newentry++)
+                       ;
 
        *list = must_realloc(*list, (newentry + 2) * sizeof(void **));
        (*list)[newentry + 1] = NULL;