Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 27 Apr 2021 21:57:01 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] remove return with expression in void function

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.