netdev-linux: Don't assume 'struct netdev' has offset 0.
authorBen Pfaff <blp@nicira.com>
Fri, 2 Aug 2013 19:19:49 +0000 (12:19 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 2 Aug 2013 19:24:18 +0000 (12:24 -0700)
commit96172faa345dbd8763fc3b1b64319c384d0a0798
treea2ec04203e90aae5072324fcf9b3cda85fe874f2
parent7d6ce2d189332aac67d65c73c582d57a17b7ac70
netdev-linux: Don't assume 'struct netdev' has offset 0.

The data items returned by netdev_get_devices() are "struct netdev *"s.
The code fixed up by this commit used them as "struct netdev_linux *",
which happens to work because struct netdev happens to be at offset 0 in
each struct but it's better to do a proper cast in case someday
struct netdev gets moved to a nonzero offset.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/netdev-linux.c