mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 10:30:13 +01:00
Having a list with only one element is often interesting to know. For example, if you are about to unlink an element, you may want to check whether afterwards the list is empty. Add c_list_is_empty_or_single() for that. It is probably more efficient than plain c_list_length_is(list, 1) and also a better name. |
||
|---|---|---|
| .. | ||
| c-list-util.c | ||
| c-list-util.h | ||
| meson.build | ||
| nm-dbus-compat.h | ||
| nm-default-std.h | ||
| nm-linux-compat.h | ||
| nm-networkmanager-compilation.h | ||
| nm-std-aux.h | ||
| nm-std-utils.c | ||
| nm-std-utils.h | ||
| README.md | ||
| unaligned-fundamental.h | ||
| unaligned.h | ||
libnm-std-aux
A static helper library with general purpose helpers on top of standard C (C11).
As this has no additional dependencies, we should have all our C code use this internal helper library. It contains helpers that should be available (and used) everywhere where we write C.
Our C is gnu11, that is C11 or newer with some GCC-ism. The requirement is that it is supported by all complilers we care about (in pratice GCC and Clang).
Parts of this library are usually already included via the nm-default*.h
headers.