mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
loader/ofw: Style(9) pass over return statements
Make these consistent. Some files weren't even consistent with themselves. Make them all either return <space> ( <value> ); or return; Sponsored by: Netflix
This commit is contained in:
parent
3f012b9508
commit
4cddd20e1e
@ -101,12 +101,12 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path
|
||||
idev = malloc(sizeof(struct ofw_devdesc));
|
||||
if (idev == NULL) {
|
||||
printf("ofw_parsedev: malloc failed\n");
|
||||
return ENOMEM;
|
||||
return (ENOMEM);
|
||||
};
|
||||
strlcpy(idev->d_path, devspec, min(rem_path - devspec + 1,
|
||||
sizeof(idev->d_path)));
|
||||
*dev = &idev->dd;
|
||||
if (path != NULL)
|
||||
*path = rem_path;
|
||||
return 0;
|
||||
return (0);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ ofw_cons_probe(struct console *cp)
|
||||
static int
|
||||
ofw_cons_init(int arg)
|
||||
{
|
||||
return 0;
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
@ -90,7 +90,7 @@ ofw_cons_getchar(void)
|
||||
if (saved_char != -1) {
|
||||
l = saved_char;
|
||||
saved_char = -1;
|
||||
return l;
|
||||
return (l);
|
||||
}
|
||||
|
||||
/* At least since version 4.0.0, QEMU became bug-compatible
|
||||
@ -109,12 +109,12 @@ ofw_cons_poll(void)
|
||||
unsigned char ch;
|
||||
|
||||
if (saved_char != -1)
|
||||
return 1;
|
||||
return (1);
|
||||
|
||||
if (OF_read(stdin, &ch, 1) > 0) {
|
||||
saved_char = ch;
|
||||
return 1;
|
||||
return (1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return (0);
|
||||
}
|
||||
|
@ -119,14 +119,14 @@ ofw_copyin(const void *src, vm_offset_t dest, const size_t len)
|
||||
}
|
||||
|
||||
bcopy(src, (void *)dest, len);
|
||||
return(len);
|
||||
return (len);
|
||||
}
|
||||
|
||||
ssize_t
|
||||
ofw_copyout(const vm_offset_t src, void *dest, const size_t len)
|
||||
{
|
||||
bcopy((void *)src, dest, len);
|
||||
return(len);
|
||||
return (len);
|
||||
}
|
||||
|
||||
ssize_t
|
||||
@ -143,7 +143,7 @@ ofw_readin(readin_handle_t fd, vm_offset_t dest, const size_t len)
|
||||
buf = malloc(chunk);
|
||||
if (buf == NULL) {
|
||||
printf("ofw_readin: buf malloc failed\n");
|
||||
return(0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (ofw_mapmem(dest, len)) {
|
||||
@ -166,5 +166,5 @@ ofw_readin(readin_handle_t fd, vm_offset_t dest, const size_t len)
|
||||
}
|
||||
|
||||
free(buf);
|
||||
return(len - resid);
|
||||
return (len - resid);
|
||||
}
|
||||
|
@ -42,5 +42,5 @@ int
|
||||
ofw_autoload(void)
|
||||
{
|
||||
/* XXX Call some machdep autoload routine? */
|
||||
return(0);
|
||||
return (0);
|
||||
}
|
||||
|
@ -80,13 +80,13 @@ static void *dmabuf;
|
||||
static int
|
||||
ofwn_match(struct netif *nif, void *machdep_hint)
|
||||
{
|
||||
return 1;
|
||||
return (1);
|
||||
}
|
||||
|
||||
static int
|
||||
ofwn_probe(struct netif *nif, void *machdep_hint)
|
||||
{
|
||||
return 0;
|
||||
return (0);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
@ -123,7 +123,7 @@ ofwn_put(struct iodesc *desc, void *pkt, size_t len)
|
||||
printf("netif_put: OF_write returned %d\n", rv);
|
||||
#endif
|
||||
|
||||
return rv;
|
||||
return (rv);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
@ -256,13 +256,13 @@ ofwn_getunit(const char *path)
|
||||
for (i = 0; i < nofwninfo; i++) {
|
||||
printf(">>> test =\t%s\n", ofwninfo[i].ofwn_path);
|
||||
if (strcmp(path, ofwninfo[i].ofwn_path) == 0)
|
||||
return i;
|
||||
return (i);
|
||||
|
||||
if (strcmp(newpath, ofwninfo[i].ofwn_path) == 0)
|
||||
return i;
|
||||
return (i);
|
||||
}
|
||||
|
||||
return -1;
|
||||
return (-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -35,7 +35,7 @@ time(time_t *tloc)
|
||||
secs = OF_milliseconds() / 1000;
|
||||
if (tloc)
|
||||
*tloc = secs;
|
||||
return secs;
|
||||
return (secs);
|
||||
}
|
||||
|
||||
time_t
|
||||
@ -43,7 +43,7 @@ getsecs(void)
|
||||
{
|
||||
time_t n = 0;
|
||||
time(&n);
|
||||
return n;
|
||||
return (n);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user