[prev in list] [next in list] [prev in thread] [next in thread] 

List:       musl
Subject:    Re: [musl] [PATCH] remove return with expression in void function
From:       Rich Felker <dalias () libc ! org>
Date:       2021-04-28 1:57:01
Message-ID: 20210428015701.GV2546 () brightrain ! aerifal ! cx
[Download RAW message or body]

On Tue, Apr 27, 2021 at 03:59:55PM -0700, Michael Forney wrote:
> ISO C says
> 
> > A return statement with an expression shall not appear in a
> > function whose return type is void
> ---
>  src/malloc/free.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/malloc/free.c b/src/malloc/free.c
> index f17a952c..3944f7b2 100644
> --- a/src/malloc/free.c
> +++ b/src/malloc/free.c
> @@ -2,5 +2,5 @@
>  
>  void free(void *p)
>  {
> -	return __libc_free(p);
> +	__libc_free(p);
>  }
> -- 
> 2.31.1

Thanks, applying!

Rich
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic