tree-wide: use -EINVAL for enum invalid values
As suggested in https://github.com/systemd/systemd/pull/11484#issuecomment-775288617. This does not touch anything exposed in src/systemd. Changing the defines there would be a compatibility break. Note that tests are broken after this commit. They will be fixed in the next one.
This commit is contained in:
@@ -63,7 +63,7 @@ typedef enum SocketAddressBindIPv6Only {
|
||||
SOCKET_ADDRESS_BOTH,
|
||||
SOCKET_ADDRESS_IPV6_ONLY,
|
||||
_SOCKET_ADDRESS_BIND_IPV6_ONLY_MAX,
|
||||
_SOCKET_ADDRESS_BIND_IPV6_ONLY_INVALID = -1
|
||||
_SOCKET_ADDRESS_BIND_IPV6_ONLY_INVALID = -EINVAL,
|
||||
} SocketAddressBindIPv6Only;
|
||||
|
||||
#define socket_address_family(a) ((a)->sockaddr.sa.sa_family)
|
||||
|
||||
Reference in New Issue
Block a user