diff options
author | Mole Shang <[email protected]> | 2024-03-02 12:55:03 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2024-03-02 12:55:03 +0800 |
commit | 74ebee5d3a81a39766ba8cd436a548449ea887b0 (patch) | |
tree | 69c238d2bff0d69aa4778d22e21de8d519b00dff /src/utils/utils.c | |
parent | 62c193bd4e464ec9d847b8abff21e10dfc7b511e (diff) | |
download | hinata-74ebee5d3a81a39766ba8cd436a548449ea887b0.tar.gz hinata-74ebee5d3a81a39766ba8cd436a548449ea887b0.tar.bz2 hinata-74ebee5d3a81a39766ba8cd436a548449ea887b0.zip |
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.
Diffstat (limited to 'src/utils/utils.c')
-rw-r--r-- | src/utils/utils.c | 7 |
1 files changed, 0 insertions, 7 deletions
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; - } -} |