Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] remove unnecessary checks for NULL in zfree and zsfree
- X-seq: zsh-workers 42411
- From: Taylor West <KrokodileGlue@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: [PATCH] remove unnecessary checks for NULL in zfree and zsfree
- Date: Thu, 1 Mar 2018 01:15:37 +0000
- Accept-language: en-US
- Cc: Taylor West <KrokodileGlue@xxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Oehb+wkziBBW49sZoNTFFb7CHR/ZK6PuTE9f1GUPJ34=; b=jG7jFC74WL3E0koI4c6y/PyTLnmGaFIP0/4vW5vWK3cZ3icrflwxoxg48oPrN7zQVfmjOo0fq0xvdRGWbQKlmjTP4K8ANjGliyfOmYCsydtSjblqlTFYPEOE74BNSFDyjPBaOwyDF8bUYPBq5g28axU9ZHkVMcpw8AFvAVlzjm/msuhuY6qnGBTHD90m4UX4Nh5didNqEi/seuSWyLcYlCYUhCLDAkufErTitM1aujecwcntJNKcKa3TkpNdfrDKkw5j6Hhk0dD4PUBc42Yx/PHaOAEB5hsC+i2aDSRywEFk84D7A3mQUbixXUPWayoXwszk5GIBbOmJIrMG9XzZ6Q==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
- Thread-index: AQHTsPrO5gNXQaJqDUyao2SqzTE4qQ==
- Thread-topic: [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