summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-dns-packet.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-09 17:17:47 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-10 14:46:59 +0100
commit2d93c20e5f600a9f1e4b617123577acf6ce5faa0 (patch)
tree9c1e17edb84c37920bb37d0fb8021c058c4ca2b3 /src/resolve/resolved-dns-packet.h
parentudev: make sure UdevBuiltinCommand is properly converted (diff)
downloadsystemd-2d93c20e5f600a9f1e4b617123577acf6ce5faa0.tar.xz
systemd-2d93c20e5f600a9f1e4b617123577acf6ce5faa0.zip
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.
Diffstat (limited to 'src/resolve/resolved-dns-packet.h')
-rw-r--r--src/resolve/resolved-dns-packet.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
index 4dba96b3b8..e7d6cb1904 100644
--- a/src/resolve/resolved-dns-packet.h
+++ b/src/resolve/resolved-dns-packet.h
@@ -22,7 +22,7 @@ typedef enum DnsProtocol {
DNS_PROTOCOL_MDNS,
DNS_PROTOCOL_LLMNR,
_DNS_PROTOCOL_MAX,
- _DNS_PROTOCOL_INVALID = -1
+ _DNS_PROTOCOL_INVALID = -EINVAL,
} DnsProtocol;
struct DnsPacketHeader {