zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] remove unnecessary checks for NULL in zfree and zsfree
@ 2018-03-01  1:15 Taylor West
  2018-03-01  1:17 ` Taylor West
  0 siblings, 1 reply; 6+ messages in thread
From: Taylor West @ 2018-03-01  1:15 UTC (permalink / raw)
  To: zsh-workers; +Cc: Taylor West

---
 Src/mem.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Src/mem.c b/Src/mem.c
index f120819..77e4375 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -1885,16 +1885,14 @@ bin_mem(char *name, char **argv, Options ops, int func)
 mod_export void
 zfree(void *p, UNUSED(int sz))
 {
-    if (p)
-	free(p);
+    free(p);
 }
 
 /**/
 mod_export void
 zsfree(char *p)
 {
-    if (p)
-	free(p);
+    free(p);
 }
 
 /**/
-- 
2.9.5


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

end of thread, other threads:[~2018-03-01 21:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01  1:15 [PATCH] remove unnecessary checks for NULL in zfree and zsfree Taylor West
2018-03-01  1:17 ` Taylor West
2018-03-01  9:15   ` Peter Stephenson
2018-03-01 13:29     ` Taylor West
2018-03-01 19:45       ` Peter Stephenson
2018-03-01 21:37         ` Joey Pabalinas

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

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

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).