summaryrefslogtreecommitdiff
path: root/src/basic/io-util.c
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2019-06-21 14:48:02 +0200
committerFranck Bui <fbui@suse.com>2019-06-27 19:01:28 +0200
commit30a0554ebdacdf32fbfe88449ea07a0a39ca40c5 (patch)
treef4a80dd4fb46c2c8b053b5a511f74e8e9d0e2712 /src/basic/io-util.c
parent47cf786c0a13fccd777c334bed4b1e7b02f18d42 (diff)
downloadsystemd-30a0554ebdacdf32fbfe88449ea07a0a39ca40c5.tar.gz
coredump: rename set_iovec_field_free() into set_iovec_string_field_free()
It's more in line with its counterpart set_iovec_string_field(). Also move the definition to io-util next to set_iovec_string_field().
Diffstat (limited to 'src/basic/io-util.c')
-rw-r--r--src/basic/io-util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/basic/io-util.c b/src/basic/io-util.c
index 575398fbe6..9394e54bc5 100644
--- a/src/basic/io-util.c
+++ b/src/basic/io-util.c
@@ -262,3 +262,11 @@ char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *f
iovec[(*n_iovec)++] = IOVEC_MAKE_STRING(x);
return x;
}
+
+char* set_iovec_string_field_free(struct iovec *iovec, size_t *n_iovec, const char *field, char *value) {
+ char *x;
+
+ x = set_iovec_string_field(iovec, n_iovec, field, value);
+ free(value);
+ return x;
+}