]> git.ipfire.org Git - thirdparty/systemd.git/commit
link: fix type for link-config's "features" array of tristates
authorThomas Haller <thaller@redhat.com>
Tue, 7 Aug 2018 06:55:07 +0000 (08:55 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 7 Aug 2018 13:40:39 +0000 (15:40 +0200)
commitcc2ff878fa8c2fd80b0f13c1e4233ad656726296
treee79b1d8659b7dcc391d5ebbeb038effff10cc48b
parentef6e83f02b017de94204faeaf2a2cdf3f4c868a2
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.
src/udev/net/ethtool-util.c
src/udev/net/ethtool-util.h
src/udev/net/link-config.c
src/udev/net/link-config.h