summaryrefslogtreecommitdiffstats
path: root/src/udev/net/link-config.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-08-07 08:55:07 +0200
committerLennart Poettering <lennart@poettering.net>2018-08-07 15:40:39 +0200
commitcc2ff878fa8c2fd80b0f13c1e4233ad656726296 (patch)
treee79b1d8659b7dcc391d5ebbeb038effff10cc48b /src/udev/net/link-config.h
parenttest: cast values in proper type to suppress warnings (diff)
downloadsystemd-cc2ff878fa8c2fd80b0f13c1e4233ad656726296.tar.xz
systemd-cc2ff878fa8c2fd80b0f13c1e4233ad656726296.zip
link: fix type for link-config's "features" array of tristates
The "features" fields is parsed as a tristate value. The values are thus not of type NetDevFeature enum but int. The NetDevFeature enum is instead the index for the features array. Adjust the type. In practice, this had no impact because NetDevFeature enum commonly has size of int. Also, don't use memset() 0xFF to initilize the int with -1. While it works correctly in practice, it feels ugly.
Diffstat (limited to '')
-rw-r--r--src/udev/net/link-config.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/net/link-config.h b/src/udev/net/link-config.h
index 713513edad..c8f4367921 100644
--- a/src/udev/net/link-config.h
+++ b/src/udev/net/link-config.h
@@ -56,7 +56,7 @@ struct link_config {
int autonegotiation;
WakeOnLan wol;
NetDevPort port;
- NetDevFeature features[_NET_DEV_FEAT_MAX];
+ int features[_NET_DEV_FEAT_MAX];
netdev_channels channels;
LIST_FIELDS(link_config, links);