]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r344161: stand: dev_net: correct net_open's interpretation of params
authorkevans <kevans@FreeBSD.org>
Mon, 8 Apr 2019 18:38:18 +0000 (18:38 +0000)
committerkevans <kevans@FreeBSD.org>
Mon, 8 Apr 2019 18:38:18 +0000 (18:38 +0000)
commit2ae18fd2584b4a8981593c08ccee70736366dda0
tree457f89c4a7334d2b8dea7ff18112c5515b25b730
parent9a9e7aeaab7435a914a6f59c974d338c0f302191
MFC r344161: stand: dev_net: correct net_open's interpretation of params

net_open previously casted the first vararg to a char * and this was
half-OK: at first, it is passed to netif_open, which would cast it back to
the struct devdesc * that it really is and use it properly. It is then
strdup()d and used as the netdev_name, which is objectively wrong.

Correct it so that the first vararg is properly casted to a struct devdesc *
and the netdev_name gets set properly to make it more clear at a glance that
it's not doing something horribly wrong.
stand/common/dev_net.c