summaryrefslogtreecommitdiff
path: root/usr/src/boot/lib/libstand/netif.c
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-08-08 15:57:29 +0300
committerDan McDonald <danmcd@joyent.com>2018-08-13 14:42:59 -0400
commit734b3a42d9fd315e40f7ce511604865fb3c2e799 (patch)
tree45b59f06924111f2431b508e3f042ee522686bca /usr/src/boot/lib/libstand/netif.c
parent857c96d257470e097e846ab8886580991b329c32 (diff)
downloadillumos-joyent-734b3a42d9fd315e40f7ce511604865fb3c2e799.tar.gz
9716 libstand: cstyle cleanup of what we just did touch
Reviewed by: Jason King <jason.king@joyent.com> Reviewed by: Yuri Pankov <yuripv@yuripv.net> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/boot/lib/libstand/netif.c')
-rw-r--r--usr/src/boot/lib/libstand/netif.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr/src/boot/lib/libstand/netif.c b/usr/src/boot/lib/libstand/netif.c
index 51bc5aa125..8f46a29668 100644
--- a/usr/src/boot/lib/libstand/netif.c
+++ b/usr/src/boot/lib/libstand/netif.c
@@ -62,7 +62,7 @@ netif_init(void)
{
struct netif_driver *drv;
int d, i;
-
+
#ifdef NETIF_DEBUG
if (netif_debug)
printf("netif_init: called\n");
@@ -84,7 +84,7 @@ netif_match(struct netif *nif, void *machdep_hint)
printf("%s%d: netif_match (%d)\n", drv->netif_bname,
nif->nif_unit, nif->nif_sel);
#endif
- return drv->netif_match(nif, machdep_hint);
+ return (drv->netif_match(nif, machdep_hint));
}
struct netif *
@@ -141,7 +141,7 @@ netif_select(void *machdep_hint)
}
if (best_if.nif_driver == NULL)
- return NULL;
+ return (NULL);
best_if.nif_driver->
netif_ifs[best_if.nif_unit].dif_used |= (1 << best_if.nif_sel);
@@ -149,10 +149,10 @@ netif_select(void *machdep_hint)
#ifdef NETIF_DEBUG
if (netif_debug)
printf("netif_select: %s%d(%d) wins\n",
- best_if.nif_driver->netif_bname,
- best_if.nif_unit, best_if.nif_sel);
+ best_if.nif_driver->netif_bname,
+ best_if.nif_unit, best_if.nif_sel);
#endif
- return &best_if;
+ return (&best_if);
}
int
@@ -164,7 +164,7 @@ netif_probe(struct netif *nif, void *machdep_hint)
if (netif_debug)
printf("%s%d: netif_probe\n", drv->netif_bname, nif->nif_unit);
#endif
- return drv->netif_probe(nif, machdep_hint);
+ return (drv->netif_probe(nif, machdep_hint));
}
void
@@ -176,15 +176,15 @@ netif_attach(struct netif *nif, struct iodesc *desc, void *machdep_hint)
if (netif_debug)
printf("%s%d: netif_attach\n", drv->netif_bname, nif->nif_unit);
#endif
- desc->io_netif = nif;
+ desc->io_netif = nif;
#ifdef PARANOID
if (drv->netif_init == NULL)
panic("%s%d: no netif_init support\n", drv->netif_bname,
nif->nif_unit);
#endif
drv->netif_init(desc, machdep_hint);
- bzero(drv->netif_ifs[nif->nif_unit].dif_stats,
- sizeof(struct netif_stats));
+ bzero(drv->netif_ifs[nif->nif_unit].dif_stats,
+ sizeof (struct netif_stats));
}
void
@@ -274,7 +274,7 @@ netif_open(void *machdep_hint)
int fd;
struct iodesc *s;
struct netif *nif;
-
+
/* find a free socket */
for (fd = 0, s = sockets; fd < SOPEN_MAX; fd++, s++)
if (s->io_netif == (struct netif *)0)
@@ -283,10 +283,10 @@ netif_open(void *machdep_hint)
return (-1);
fnd:
- bzero(s, sizeof(*s));
+ bzero(s, sizeof (*s));
netif_init();
nif = netif_select(machdep_hint);
- if (!nif)
+ if (!nif)
panic("netboot: no interfaces left untried");
if (netif_probe(nif, machdep_hint)) {
printf("netboot: couldn't probe %s%d\n",