mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 17:10:08 +01:00
Returning TRUE for zero makes no sense. Obviously, zero is not a power of two. Also, the function is used to check whether a number has only one bit (flag) set, so, an alternative name would be "has-one-bit-set", which also should return FALSE for zero. All callers didn't really care for the previous meaning "has-at-most-one-bit-set". This also avoids the issue of checking (x >= 0), which causes -Wtype-limits warnings for unsigned types. Which was avoided by doing (x == 0 || x > 0), which caused -Wlogical-op warning, which then was avoided (x == 0 || (x > 0 && 1)). Just don't. |
||
|---|---|---|
| .. | ||
| c-list.h | ||
| gsystem-local-alloc.h | ||
| nm-enum-utils.c | ||
| nm-enum-utils.h | ||
| nm-glib.h | ||
| nm-macros-internal.h | ||
| nm-shared-utils.c | ||
| nm-shared-utils.h | ||
| nm-test-utils.h | ||
| nm-udev-utils.c | ||
| nm-udev-utils.h | ||
| nm-vpn-editor-plugin-call.h | ||
| nm-vpn-plugin-macros.h | ||
| nm-vpn-plugin-utils.c | ||
| nm-vpn-plugin-utils.h | ||
| unaligned.h | ||