From 74ebee5d3a81a39766ba8cd436a548449ea887b0 Mon Sep 17 00:00:00 2001 From: Mole Shang <135e2@135e2.dev> Date: Sat, 2 Mar 2024 12:55:03 +0800 Subject: tree-wide: use FREE_AND_NULLIFY macro and reformat code Jeez idk why i forgot the pass-by-value feature, so the original version never gets the pointer nullified. Fix it by using our favourite C-style macro. --- src/utils/utils.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/utils/utils.c') diff --git a/src/utils/utils.c b/src/utils/utils.c index ae60eee..7b94ff3 100644 --- a/src/utils/utils.c +++ b/src/utils/utils.c @@ -169,10 +169,3 @@ int repchr(char *str, char t, char r) { } return c; } - -void free_and_nullify(void *p) { - if (p) { - free(p); - p = NULL; - } -} -- cgit v1.2.3