mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
nasmlib/alloc.c: no reason to clear q in nasm_free()
q is passed in by reference and the value of q is never examined, so there is absolutely no reason to set q = NULL in nasm_free(). Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
8d4733962e
commit
0dd578ce68
1 changed files with 1 additions and 3 deletions
|
|
@ -74,10 +74,8 @@ void *nasm_realloc(void *q, size_t size)
|
|||
|
||||
void nasm_free(void *q)
|
||||
{
|
||||
if (q){
|
||||
if (q)
|
||||
free(q);
|
||||
q = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
char *nasm_strdup(const char *s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue