Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] remove unnecessary checks for NULL in zfree and zsfree



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



Messages sorted by: Reverse Date, Date, Thread, Author