tree-wide: return NULL from freeing functions

I started working on this because I wanted to change how
DEFINE_TRIVIAL_CLEANUP_FUNC is defined. Even independently of that change, it's
nice to make make things more consistent and predictable.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-02-16 17:15:10 +01:00
parent 5d160a2304
commit 75db809ae5
52 changed files with 154 additions and 165 deletions
+2 -2
View File
@@ -32,8 +32,8 @@ struct strbuf_child_entry {
struct strbuf_node *child;
};
struct strbuf *strbuf_new(void);
struct strbuf* strbuf_new(void);
ssize_t strbuf_add_string(struct strbuf *str, const char *s, size_t len);
void strbuf_complete(struct strbuf *str);
void strbuf_cleanup(struct strbuf *str);
struct strbuf* strbuf_cleanup(struct strbuf *str);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct strbuf*, strbuf_cleanup);