1:255.13-alt1
[systemd_ALT.git] / man / sd-bus-container-append.c
blob8bb4f33e867ab4e71dbf924fdb2267fa0e8be2ce
1 /* SPDX-License-Identifier: MIT-0 */
3 #include <systemd/sd-bus.h>
5 int append_strings_to_message(sd_bus_message *m, const char *const *arr) {
6 int r;
8 r = sd_bus_message_open_container(m, 'a', "s");
9 if (r < 0)
10 return r;
12 for (const char *s = *arr; *s; s++) {
13 r = sd_bus_message_append(m, "s", s);
14 if (r < 0)
15 return r;
18 return sd_bus_message_close_container(m);