summary refs log tree commit diff
path: root/shared/nm-std-aux/c-list-util.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-10-05 22:27:18 +0200
committerMichael Biebl <biebl@debian.org>2020-10-05 22:27:18 +0200
commitaafc1dbe4712c86189bbc1d4d54ad8cb4c69be7e (patch)
treea2a9bb4d007339a0b1304540388230ccedac32bd /shared/nm-std-aux/c-list-util.h
parente7b44ef4c80907346ec7492a09c45277459924fc (diff)
New upstream version 1.27.90 upstream/1.27.90
Diffstat (limited to 'shared/nm-std-aux/c-list-util.h')
-rw-r--r--shared/nm-std-aux/c-list-util.h39
1 files changed, 17 insertions, 22 deletions
diff --git a/shared/nm-std-aux/c-list-util.h b/shared/nm-std-aux/c-list-util.h
index d1aaa0b1..828481e1 100644
--- a/shared/nm-std-aux/c-list-util.h
+++ b/shared/nm-std-aux/c-list-util.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /*
  * Copyright (C) 2017 Red Hat, Inc.
  */
@@ -10,19 +10,13 @@
 
 /*****************************************************************************/
 
-void c_list_relink (CList *lst);
+void c_list_relink(CList *lst);
 
-typedef int (*CListSortCmp) (const CList *a,
-                             const CList *b,
-                             const void *user_data);
+typedef int (*CListSortCmp)(const CList *a, const CList *b, const void *user_data);
 
-CList *c_list_sort_headless (CList *lst,
-                             CListSortCmp cmp,
-                             const void *user_data);
+CList *c_list_sort_headless(CList *lst, CListSortCmp cmp, const void *user_data);
 
-void c_list_sort (CList *head,
-                  CListSortCmp cmp,
-                  const void *user_data);
+void c_list_sort(CList *head, CListSortCmp cmp, const void *user_data);
 
 /* c_list_length_is:
  * @list: the #CList list head
@@ -34,17 +28,18 @@ void c_list_sort (CList *head,
  *   list, by passing @check_len as 1.
  */
 static inline int
-c_list_length_is (const CList *list, unsigned long check_len) {
-	unsigned long n = 0;
-	const CList *iter;
-
-	c_list_for_each (iter, list) {
-		++n;
-		if (n > check_len)
-			return 0;
-	}
-
-	return n == check_len;
+c_list_length_is(const CList *list, unsigned long check_len)
+{
+    unsigned long n = 0;
+    const CList * iter;
+
+    c_list_for_each (iter, list) {
+        ++n;
+        if (n > check_len)
+            return 0;
+    }
+
+    return n == check_len;
 }
 
 #endif /* __C_LIST_UTIL_H__ */