From e12e4ef84960a7d093b9c276069a052b6862aa6f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 10 Feb 2021 09:55:40 +0100 Subject: [PATCH] shared: return NMStrBuf instance from nm_str_buf_reset() it can be useful for chaining, and it costs nothing to do this on an inline function. --- shared/nm-glib-aux/nm-str-buf.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/nm-glib-aux/nm-str-buf.h b/shared/nm-glib-aux/nm-str-buf.h index 32cfd4105d..cb0d3fb189 100644 --- a/shared/nm-glib-aux/nm-str-buf.h +++ b/shared/nm-glib-aux/nm-str-buf.h @@ -294,7 +294,7 @@ nm_str_buf_append_c_len(NMStrBuf *strbuf, char ch, gsize len) /*****************************************************************************/ -static inline void +static inline NMStrBuf * nm_str_buf_reset(NMStrBuf *strbuf) { _nm_str_buf_assert(strbuf); @@ -306,6 +306,8 @@ nm_str_buf_reset(NMStrBuf *strbuf) } strbuf->_priv_len = 0; } + + return strbuf; } /*****************************************************************************/