[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] Convert from K&R to ANSI
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 2/2] Convert from K&R to ANSI |
Date: |
Thu, 30 Dec 2021 15:46:28 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Etienne Brateau, le jeu. 30 déc. 2021 12:22:49 +0100, a ecrit:
> * device/dev_name.c: Convert function prototypes from K&R to ANSI.
> * device/subr.c: Convert function prototypes from K&R to ANSI.
Ah, somebody had previously worked on the conversion but apparently
missed these, applied, thanks!
Samuel
> ---
> device/dev_name.c | 10 ++--------
> device/subrs.c | 20 ++++++--------------
> 2 files changed, 8 insertions(+), 22 deletions(-)
>
> diff --git a/device/dev_name.c b/device/dev_name.c
> index 9f6b00f7..1761bf8d 100644
> --- a/device/dev_name.c
> +++ b/device/dev_name.c
> @@ -204,10 +204,7 @@ boolean_t dev_name_lookup(
> * Change an entry in the indirection list.
> */
> void
> -dev_set_indirection(name, ops, unit)
> - const char *name;
> - dev_ops_t ops;
> - int unit;
> +dev_set_indirection(const char *name, dev_ops_t ops, int unit)
> {
> dev_indirect_t di;
>
> @@ -220,10 +217,7 @@ dev_set_indirection(name, ops, unit)
> }
> }
>
> -boolean_t dev_change_indirect(iname, dname, unit)
> - const char *iname;
> - const char *dname;
> - int unit;
> +boolean_t dev_change_indirect(const char *iname, const char *dname, int unit)
> {
> struct dev_ops *dp;
> struct dev_indirect *di;
> diff --git a/device/subrs.c b/device/subrs.c
> index a10b72d7..be710132 100644
> --- a/device/subrs.c
> +++ b/device/subrs.c
> @@ -40,9 +40,7 @@
> /*
> * Print out disk name and block number for hard disk errors.
> */
> -void harderr(ior, cp)
> - const io_req_t ior;
> - const char * cp;
> +void harderr(const io_req_t ior, const char *cp)
> {
> printf("%s%d%c: hard error sn%d ",
> cp,
> @@ -55,8 +53,7 @@ void harderr(ior, cp)
> * Convert Ethernet address to printable (loggable) representation.
> */
> char *
> -ether_sprintf(ap)
> - const u_char *ap;
> +ether_sprintf(const u_char *ap)
> {
> int i;
> static char etherbuf[18];
> @@ -88,23 +85,19 @@ void if_init_queues(struct ifnet *ifp)
> /*
> * Compatibility with BSD device drivers.
> */
> -void sleep(channel, priority)
> - vm_offset_t channel;
> - int priority;
> +void sleep(vm_offset_t channel, int priority)
> {
> assert_wait((event_t) channel, FALSE); /* not interruptible XXX */
> thread_block((void (*)()) 0);
> }
>
> -void wakeup(channel)
> - vm_offset_t channel;
> +void wakeup(vm_offset_t channel)
> {
> thread_wakeup((event_t) channel);
> }
>
> io_req_t
> -geteblk(size)
> - int size;
> +geteblk(int size)
> {
> io_req_t ior;
>
> @@ -127,8 +120,7 @@ geteblk(size)
> return (ior);
> }
>
> -void brelse(ior)
> - io_req_t ior;
> +void brelse(io_req_t ior)
> {
> (void) vm_deallocate(kernel_map,
> (vm_offset_t) ior->io_data,
> --
> 2.34.1
>
>
--
Samuel
c> [ ] morning [ ] afternoon [ ] evening [ ] night , everyone (choose as
applicable)