git: 4c4563e32dfc - main - ofw_net: Use c99 initializers
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 29 Nov 2022 21:49:45 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4c4563e32dfce0652953fcbd160a9dfdda050cc4 commit 4c4563e32dfce0652953fcbd160a9dfdda050cc4 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-11-29 21:47:02 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-11-29 21:49:06 +0000 ofw_net: Use c99 initializers Update to use c99 initializers, although there's no plans to change anything that this would make easier... Sponsored by: Netflix Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D37442 --- stand/libofw/ofw_net.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/stand/libofw/ofw_net.c b/stand/libofw/ofw_net.c index 643f989d5018..fa4a3abd88e8 100644 --- a/stand/libofw/ofw_net.c +++ b/stand/libofw/ofw_net.c @@ -53,22 +53,26 @@ static void ofwn_end(struct netif *); extern struct netif_stats ofwn_stats[]; struct netif_dif ofwn_ifs[] = { - /* dif_unit dif_nsel dif_stats dif_private */ - { 0, 1, &ofwn_stats[0], 0, }, + { + .dif_unit=0, + .dif_nsel=1, + .dif_stats=&ofwn_stats[0], + .dif_private=0, + }, }; struct netif_stats ofwn_stats[nitems(ofwn_ifs)]; struct netif_driver ofwnet = { - "net", /* netif_bname */ - ofwn_match, /* netif_match */ - ofwn_probe, /* netif_probe */ - ofwn_init, /* netif_init */ - ofwn_get, /* netif_get */ - ofwn_put, /* netif_put */ - ofwn_end, /* netif_end */ - ofwn_ifs, /* netif_ifs */ - nitems(ofwn_ifs) /* netif_nifs */ + .netif_bname="net", + .netif_match=ofwn_match, + .netif_probe=ofwn_probe, + .netif_init=ofwn_init, + .netif_get=ofwn_get, + .netif_put=ofwn_put, + .netif_end=ofwn_end, + .netif_ifs=ofwn_ifs, + .netif_nifs=nitems(ofwn_ifs) }; static ihandle_t netinstance;