summaryrefslogtreecommitdiffstats
path: root/src/basic/strbuf.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-16 13:48:04 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-16 17:15:10 +0100
commit75db809ae583ef7287e39738195c0825c3070843 (patch)
tree9793b944d340516003c0fc10ccb9322a4e126721 /src/basic/strbuf.h
parentnetworkd: make network_config_section_free() inline (diff)
downloadsystemd-75db809ae583ef7287e39738195c0825c3070843.tar.xz
systemd-75db809ae583ef7287e39738195c0825c3070843.zip
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.
Diffstat (limited to 'src/basic/strbuf.h')
-rw-r--r--src/basic/strbuf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/strbuf.h b/src/basic/strbuf.h
index 82758d721b..9a21438d64 100644
--- a/src/basic/strbuf.h
+++ b/src/basic/strbuf.h
@@ -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);