[PATCH v2] Move libc_freeres_ptrs and libc_subfreeres to hidden/weak functions
Andreas Schwab
schwab@suse.de
Tue Dec 13 12:30:33 GMT 2022
On Dez 13 2022, Adhemerval Zanella via Libc-alpha wrote:
> +#define set_freeres_declare_name(__name) \
> + __name ## _aux
> +#define set_freeres_declare_ptr(__name, __ptr) \
> + void set_freeres_declare_name (__name) (void) \
> + { \
> + if (__ptr != NULL) \
> + free (__ptr); \
You can call free with NULL just fine.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list