diff options
author | Dan Winship <danw@gnome.org> | 2014-07-07 12:04:14 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-08-07 12:11:49 -0400 |
commit | ea456aaa81f2290618421d28a824b85e02002fdf (patch) | |
tree | 9139087dc2ac31de6c44d6a21596daed3ff85fc1 /libnm-core/nm-setting-wired.c | |
parent | 0dcba8a9a0b9d1dcfff90348bb433d2625489017 (diff) | |
download | NetworkManager-ea456aaa81f2290618421d28a824b85e02002fdf.tar.gz |
all: remove use of struct ether_addr / ether_aton()
Lots of old code used struct ether_addr to store hardware addresses,
and ether_aton() to parse them, but more recent code generally uses
guint8 arrays, and the nm_utils_hwaddr_* methods, to be able to share
code between ETH_ALEN and INFINIBAND_ALEN cases. So update the old
code to match the new. (In many places, this ends up getting rid of
casts between struct ether_addr and guint8* anyway.)
(Also, in some places, variables were switched from struct ether_addr
to guint8[] a while back, but some code still used "&" when referring
to them even though that's unnecessary now. Clean that up.)
Diffstat (limited to 'libnm-core/nm-setting-wired.c')
-rw-r--r-- | libnm-core/nm-setting-wired.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c index 2b0e31406a..6dd9c2ede7 100644 --- a/libnm-core/nm-setting-wired.c +++ b/libnm-core/nm-setting-wired.c @@ -622,9 +622,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) for (mac_blacklist_iter = priv->mac_address_blacklist; mac_blacklist_iter; mac_blacklist_iter = mac_blacklist_iter->next) { - struct ether_addr addr; - - if (!ether_aton_r (mac_blacklist_iter->data, &addr)) { + if (!nm_utils_hwaddr_valid (mac_blacklist_iter->data, ETH_ALEN)) { g_set_error (error, NM_SETTING_WIRED_ERROR, NM_SETTING_WIRED_ERROR_INVALID_PROPERTY, |