aboutsummaryrefslogtreecommitdiff
path: root/device
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-01-19 14:22:31 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-19 23:33:16 +0100
commitc5134c7759b7a3f0c4ed0b57a1ab8e49666ee4b6 (patch)
treeb0dfa3fb6696453a921d088a0b0099fd1b8cd285 /device
parent4a1be513c08971b69d80f00478ade68cb25e7d3b (diff)
downloadgnumach-c5134c7759b7a3f0c4ed0b57a1ab8e49666ee4b6.tar.gz
gnumach-c5134c7759b7a3f0c4ed0b57a1ab8e49666ee4b6.tar.bz2
gnumach-c5134c7759b7a3f0c4ed0b57a1ab8e49666ee4b6.zip
Remove existing old style definitions and use -Wold-style-definition.
Message-Id: <Y8mYd/pt/og4Tj5I@mercury.tail36e24.ts.net>
Diffstat (limited to 'device')
-rw-r--r--device/cons.c3
-rw-r--r--device/dev_lookup.c3
-rw-r--r--device/dev_name.c7
-rw-r--r--device/net_io.c32
4 files changed, 19 insertions, 26 deletions
diff --git a/device/cons.c b/device/cons.c
index b04621ae..3f7cb9d1 100644
--- a/device/cons.c
+++ b/device/cons.c
@@ -140,8 +140,7 @@ cnmaygetc(void)
}
void
-cnputc(c)
- char c;
+cnputc(char c)
{
if (c == 0)
return;
diff --git a/device/dev_lookup.c b/device/dev_lookup.c
index bebdf6f3..994452cd 100644
--- a/device/dev_lookup.c
+++ b/device/dev_lookup.c
@@ -295,8 +295,7 @@ dev_port_lookup(ipc_port_t port)
* Consumes a device reference; produces a naked send right.
*/
ipc_port_t
-convert_device_to_port(device)
- const device_t device;
+convert_device_to_port(const device_t device)
{
if (device == DEVICE_NULL)
return IP_NULL;
diff --git a/device/dev_name.c b/device/dev_name.c
index e64fd0e9..abd525ca 100644
--- a/device/dev_name.c
+++ b/device/dev_name.c
@@ -103,10 +103,9 @@ nomap(dev_t dev, vm_offset_t off, int prot)
* next character of target is 0 (end of string).
*/
boolean_t __attribute__ ((pure))
-name_equal(src, len, target)
- const char *src;
- int len;
- const char *target;
+name_equal(const char *src,
+ int len,
+ const char *target)
{
while (--len >= 0)
if (*src++ != *target++)
diff --git a/device/net_io.c b/device/net_io.c
index 4392f711..d1cd5a67 100644
--- a/device/net_io.c
+++ b/device/net_io.c
@@ -368,8 +368,7 @@ decl_simple_lock_data(,net_hash_header_lock)
* Returns TRUE for high-priority packets.
*/
-boolean_t ethernet_priority(kmsg)
- const ipc_kmsg_t kmsg;
+boolean_t ethernet_priority(const ipc_kmsg_t kmsg)
{
unsigned char *addr =
(unsigned char *) net_kmsg(kmsg)->header;
@@ -690,9 +689,8 @@ int net_filter_queue_reorder = 0; /* non-zero to enable reordering */
* We are *not* called at interrupt level.
*/
void
-net_filter(kmsg, send_list)
- const ipc_kmsg_t kmsg;
- ipc_kmsg_queue_t send_list;
+net_filter(const ipc_kmsg_t kmsg,
+ ipc_kmsg_queue_t send_list)
{
struct ifnet *ifp;
net_rcv_port_t infp, nextfp;
@@ -871,11 +869,10 @@ net_filter(kmsg, send_list)
}
boolean_t
-net_do_filter(infp, data, data_count, header)
- net_rcv_port_t infp;
- const char * data;
- unsigned int data_count;
- const char * header;
+net_do_filter(net_rcv_port_t infp,
+ const char * data,
+ unsigned int data_count,
+ const char * header)
{
int stack[NET_FILTER_STACK_DEPTH+1];
int *sp;
@@ -1983,9 +1980,8 @@ bpf_eq(
}
unsigned int
-bpf_hash (n, keys)
- int n;
- const unsigned int *keys;
+bpf_hash (int n,
+ const unsigned int *keys)
{
unsigned int hval = 0;
@@ -1997,11 +1993,11 @@ bpf_hash (n, keys)
int
-bpf_match (hash, n_keys, keys, hash_headpp, entpp)
- net_hash_header_t hash;
- int n_keys;
- const unsigned int *keys;
- net_hash_entry_t **hash_headpp, *entpp;
+bpf_match (net_hash_header_t hash,
+ int n_keys,
+ const unsigned int *keys,
+ net_hash_entry_t **hash_headpp,
+ net_hash_entry_t *entpp)
{
net_hash_entry_t head, entp;
int i;