mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 17:06:39 +09:00
dc6bf94d68c38bd20d0abb94a4440441e13eaba3
The ?: operator is very useful for chaining comparison functions (strcmp, memcmp, CMP), since its behavior is to return the result of the comparison function call if non-zero, or continue evaluating the chain of comparison functions. This simplifies the code in that using a temporary `r` variable to store the function results is no longer necessary and the checks for non-zero to return are no longer needed either, resulting in a typical three-fold reduction to the number of lines in the code. Introduce a new memcmp_nn() to compare two memory buffers in lexicographic order, taking length in consideration. Tested: $ ninja -C build/ test All test cases pass. In particular, test_multiple_neighbors_sorted() in test-lldp would catch regressions introduced by this commit.
…
systemd - System and Service Manager
Details
General information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.
Description
Languages
C
89%
Python
5.1%
Shell
4.5%
Meson
1.2%