diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-10-31 16:00:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-10-31 23:08:11 +0100 |
commit | 811aa36ab6ee4da8daca386f8c3c338a720a4f0d (patch) | |
tree | 2360a164e7d60767f82029973dbcff9c00ab101b /src/basic | |
parent | coredump: move to _cleanup_ for destroying iovw object (diff) | |
download | systemd-811aa36ab6ee4da8daca386f8c3c338a720a4f0d.tar.xz systemd-811aa36ab6ee4da8daca386f8c3c338a720a4f0d.zip |
iovw: add simpler iovw_done() destructor
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/iovec-wrapper.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/iovec-wrapper.h b/src/basic/iovec-wrapper.h index 0c6d760a73..4754b98fbb 100644 --- a/src/basic/iovec-wrapper.h +++ b/src/basic/iovec-wrapper.h @@ -23,6 +23,10 @@ static inline void iovw_done_free(struct iovec_wrapper *iovw) { iovw_free_contents(iovw, true); } +static inline void iovw_done(struct iovec_wrapper *iovw) { + iovw_free_contents(iovw, false); +} + int iovw_put(struct iovec_wrapper *iovw, void *data, size_t len); static inline int iovw_consume(struct iovec_wrapper *iovw, void *data, size_t len) { /* Move data into iovw or free on error */ |