diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2023-12-29 16:20:57 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-12-29 22:32:06 +0100 |
commit | ca25d072393167164657770091b8b58f0183eb59 (patch) | |
tree | b8d443e0d9a57dd5672441e3914684111d09d562 /pfinet | |
parent | 1eee1e2c72bbe0c1351fdc2a0ac3e456eb2cc2ca (diff) | |
download | hurd-ca25d072393167164657770091b8b58f0183eb59.tar.gz hurd-ca25d072393167164657770091b8b58f0183eb59.tar.bz2 hurd-ca25d072393167164657770091b8b58f0183eb59.zip |
Use mach_msg_type_number_t whenever required to avoid warnings
Message-ID: <20231229212105.858759-3-flaviocruz@gmail.com>
Diffstat (limited to 'pfinet')
-rw-r--r-- | pfinet/ethernet.c | 2 | ||||
-rw-r--r-- | pfinet/io-ops.c | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c index ad21917e..65ec1e21 100644 --- a/pfinet/ethernet.c +++ b/pfinet/ethernet.c @@ -324,7 +324,7 @@ void setup_ethernet_device (char *name, struct device **device) { struct net_status netstat; - size_t count; + mach_msg_type_number_t count; int net_address[2]; error_t err; struct ether_device *edev; diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c index 818f1133..5f83a02f 100644 --- a/pfinet/io-ops.c +++ b/pfinet/io-ops.c @@ -135,10 +135,11 @@ S_io_seek (struct sock_user *user, kern_return_t S_io_readable (struct sock_user *user, - vm_size_t *amount) + vm_size_t *out_amount) { struct sock *sk; error_t err; + mach_msg_type_number_t amount = 0; if (!user) return EOPNOTSUPP; @@ -160,7 +161,8 @@ S_io_readable (struct sock_user *user, { case SOCK_STREAM: case SOCK_SEQPACKET: - err = tcp_tiocinq (sk, amount); + err = tcp_tiocinq (sk, &amount); + *out_amount = amount; break; case SOCK_DGRAM: @@ -169,7 +171,7 @@ S_io_readable (struct sock_user *user, err = EINVAL; else /* Boy, I really love the C language. */ - *amount = (skb_peek (&sk->receive_queue) + *out_amount = (skb_peek (&sk->receive_queue) ? : &((struct sk_buff){}))->len; break; @@ -358,7 +360,7 @@ S_io_reauthenticate (struct sock_user *user, struct sock_user *newuser; uid_t gubuf[20], ggbuf[20], aubuf[20], agbuf[20]; uid_t *gen_uids, *gen_gids, *aux_uids, *aux_gids; - size_t genuidlen, gengidlen, auxuidlen, auxgidlen; + mach_msg_type_number_t genuidlen, gengidlen, auxuidlen, auxgidlen; error_t err; size_t i, j; auth_t auth; |