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:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user