diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2021-01-11 18:07:03 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2021-01-11 18:15:57 +0100 |
| commit | 2567f558da3eb9911678227d4aeb15162e707d89 (patch) | |
| tree | 13c80b0e091c8ba585b14b966cda998f95f1936d /shared/nm-std-aux/c-list-util.h | |
| parent | 02d99ffd62ede29cffcb45fcbe33d044b7406d3a (diff) | |
| parent | f54032b30e1ddd84f10a339e0caf493772e049a7 (diff) | |
Merge branch 'debian/master' into ubuntu/master
Diffstat (limited to 'shared/nm-std-aux/c-list-util.h')
| -rw-r--r-- | shared/nm-std-aux/c-list-util.h | 39 |
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__ */ |