1 /* SPDX-License-Identifier: CC0-1.0 */ 2 3 #include <systemd/sd-bus.h> 4 append_strings_to_message(sd_bus_message * m,const char * const * arr)5int append_strings_to_message(sd_bus_message *m, const char *const *arr) { 6 int r; 7 8 r = sd_bus_message_open_container(m, 'a', "s"); 9 if (r < 0) 10 return r; 11 12 for (const char *s = *arr; *s; s++) { 13 r = sd_bus_message_append(m, "s", s); 14 if (r < 0) 15 return r; 16 } 17 18 return sd_bus_message_close_container(m); 19 } 20