The arg types==NULL has different meanings for different functions. Some
functions like sd_bus_message_appendv() require a non-null param and treat "" as
"no data". Other functions like sd_bus_skip() treat null as "process one item",
while the convenience functions treat NULL the same as "". So I think it's
reasonable to make the convenience functions handle NULL explicitly, separately
from "". That way the logical separation of concerns is clearer, and e.g.
sd_bus_message_appendv() handles all non-null strings, while e.g.
sd_bus_call_methodv() doesn't look into the string at all.
Behaviour is unchanged.
if (r < 0)
return r;
- if (!isempty(types)) {
+ if (types) {
r = sd_bus_message_appendv(m, types, ap);
if (r < 0)
return r;
if (r < 0)
return r;
- if (!isempty(types)) {
+ if (types) {
r = sd_bus_message_appendv(m, types, ap);
if (r < 0)
return r;
if (r < 0)
goto fail;
- if (!isempty(types)) {
+ if (types) {
r = sd_bus_message_appendv(m, types, ap);
if (r < 0)
goto fail;
if (r < 0)
return r;
- if (!isempty(types)) {
+ if (types) {
r = sd_bus_message_appendv(m, types, ap);
if (r < 0)
return r;