From: Lennart Poettering Date: Fri, 6 Sep 2024 09:30:23 +0000 (+0200) Subject: man: document that sd_bus_message_read_strv() happily spits out empty arrays as NULL X-Git-Tag: v257-rc1~534 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22f3f2cebd1918cfc8cc2e8a2404b051048b7bfc;p=thirdparty%2Fsystemd.git man: document that sd_bus_message_read_strv() happily spits out empty arrays as NULL Fixes: #34163 --- diff --git a/man/sd_bus_message_read_strv.xml b/man/sd_bus_message_read_strv.xml index 3b4910d7cbf..9b479349b66 100644 --- a/man/sd_bus_message_read_strv.xml +++ b/man/sd_bus_message_read_strv.xml @@ -49,7 +49,9 @@ signatures (D-Bus type ag). On success, a pointer to a NULL-terminated array of strings (strv) is returned in the output parameter l. Note that ownership of this array is transferred to the caller. Hence, the - caller is responsible for freeing this array and its contents. + caller is responsible for freeing this array and its contents. Also note that as a matter of + optimization, if an empty array is encountered a NULL pointer might be returned + here, and should be considered equivalent to an array with zero entries. sd_bus_message_read_strv_extend() is similar, but the second parameter is an input-output parameter. If *l is NULL, if behaves identically