git: e830a6cbbe8e - main - kboot: Use (void) instead of () for functiosn with no args
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 09 Dec 2022 14:58:56 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=e830a6cbbe8e7ab359e871b0ba95b9b025c0ffcc
commit e830a6cbbe8e7ab359e871b0ba95b9b025c0ffcc
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-12-09 14:55:42 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-12-09 14:57:50 +0000
kboot: Use (void) instead of () for functiosn with no args
`int foo();` means 'a function that takes any number of arguments.`
not `a function that takes no arguemnts`, that's spelled `int foo(void);`
Adopt the latter.
Sponsored by: Netflix
---
stand/kboot/hostcons.c | 8 ++++----
stand/kboot/main.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/stand/kboot/hostcons.c b/stand/kboot/hostcons.c
index 80d4a1c4319b..9ff536279a73 100644
--- a/stand/kboot/hostcons.c
+++ b/stand/kboot/hostcons.c
@@ -34,8 +34,8 @@ __FBSDID("$FreeBSD$");
static void hostcons_probe(struct console *cp);
static int hostcons_init(int arg);
static void hostcons_putchar(int c);
-static int hostcons_getchar();
-static int hostcons_poll();
+static int hostcons_getchar(void);
+static int hostcons_poll(void);
struct console hostconsole = {
"host",
@@ -79,7 +79,7 @@ hostcons_putchar(int c)
}
static int
-hostcons_getchar()
+hostcons_getchar(void)
{
uint8_t ch;
int rv;
@@ -91,7 +91,7 @@ hostcons_getchar()
}
static int
-hostcons_poll()
+hostcons_poll(void)
{
struct host_timeval tv = {0,0};
long fds = 1 << 0;
diff --git a/stand/kboot/main.c b/stand/kboot/main.c
index 88657d908b34..85453db50fa5 100644
--- a/stand/kboot/main.c
+++ b/stand/kboot/main.c
@@ -125,7 +125,7 @@ kboot_rsdp_from_efi(void)
}
static void
-find_acpi()
+find_acpi(void)
{
rsdp = kboot_rsdp_from_efi();
#if 0 /* maybe for amd64 */
@@ -135,13 +135,13 @@ find_acpi()
}
vm_offset_t
-acpi_rsdp()
+acpi_rsdp(void)
{
return (rsdp);
}
bool
-has_acpi()
+has_acpi(void)
{
return rsdp != 0;
}