mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH] remove return with expression in void function
@ 2021-04-27 22:59 Michael Forney
  2021-04-28  1:57 ` Rich Felker
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Forney @ 2021-04-27 22:59 UTC (permalink / raw)
  To: musl

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-28  1:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 22:59 [musl] [PATCH] remove return with expression in void function Michael Forney
2021-04-28  1:57 ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).