]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: document that sd_bus_message_read_strv() happily spits out empty arrays as NULL
authorLennart Poettering <lennart@poettering.net>
Fri, 6 Sep 2024 09:30:23 +0000 (11:30 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 6 Sep 2024 12:10:12 +0000 (14:10 +0200)
Fixes: #34163
man/sd_bus_message_read_strv.xml

index 3b4910d7cbf0dff6e66168461969bf52281aefca..9b479349b66bce749c0c10d6b74f2f293fcb8cae 100644 (file)
@@ -49,7 +49,9 @@
     signatures (D-Bus type <literal>ag</literal>). On success, a pointer to a
     <constant>NULL</constant>-terminated array of strings (strv) is returned in the output parameter
     <parameter>l</parameter>. Note that ownership of this array is transferred to the caller. Hence, the
-    caller is responsible for freeing this array and its contents.</para>
+    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 <constant>NULL</constant> pointer might be returned
+    here, and should be considered equivalent to an array with zero entries.</para>
 
     <para><function>sd_bus_message_read_strv_extend()</function> is similar, but the second parameter is an
     input-output parameter. If <parameter>*l</parameter> is <constant>NULL</constant>, if behaves identically