]> git.ipfire.org Git - thirdparty/systemd.git/commit
iovec-util: rework IOVEC_MAKE_STRING() to work with compound initialized input
authorLennart Poettering <lennart@poettering.net>
Mon, 20 Nov 2023 16:04:46 +0000 (17:04 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 5 Jan 2024 10:10:22 +0000 (11:10 +0100)
commit33d1febbd7bf4cd10ce537ec86a8e884c47c529a
tree97c99ca227324dc961beeacdc27754b7e8378125
parentb22f0a502d2c688d0a92c388b1bb810155f3e16b
iovec-util: rework IOVEC_MAKE_STRING() to work with compound initialized input

This avoids the ({}) that IOVEC_MAKE_STRING() so far used and might
cause a memory corruption if the parameter passed in is itself allocated
via a compount initialized array or so.

Also, this makes sure both IOVEC_MAKE_STRING() and IOVEC_MAKE() accept
'const' parameters without this causing a compiler warning.
src/basic/iovec-util.h