X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flibsystemd%2Fsd-bus%2Fbus-control.c;h=ac27df8691d75012597a1eab780a41be98befbb6;hp=5dd2307f535bbea9f3a17d53983998b70d5d3cf5;hb=63c372cb9df3bee01e3bf8cd7f96f336bddda846;hpb=21fce57b26f50381d21a22be4d62a8f6067dc5c9 diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index 5dd2307f5..ac27df869 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -1268,7 +1268,7 @@ int bus_add_match_internal_kernel( if (c->type - BUS_MATCH_ARG < 3) name_change_arg[c->type - BUS_MATCH_ARG] = c->value_str; - snprintf(buf, sizeof(buf), "arg%u", c->type - BUS_MATCH_ARG); + xsprintf(buf, "arg%i", c->type - BUS_MATCH_ARG); bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, buf, c->value_str); using_bloom = true; break; @@ -1277,7 +1277,7 @@ int bus_add_match_internal_kernel( case BUS_MATCH_ARG_PATH...BUS_MATCH_ARG_PATH_LAST: { char buf[sizeof("arg")-1 + 2 + sizeof("-slash-prefix")]; - snprintf(buf, sizeof(buf), "arg%u-slash-prefix", c->type - BUS_MATCH_ARG_PATH); + xsprintf(buf, "arg%i-slash-prefix", c->type - BUS_MATCH_ARG_PATH); bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, buf, c->value_str); using_bloom = true; break; @@ -1286,7 +1286,7 @@ int bus_add_match_internal_kernel( case BUS_MATCH_ARG_NAMESPACE...BUS_MATCH_ARG_NAMESPACE_LAST: { char buf[sizeof("arg")-1 + 2 + sizeof("-dot-prefix")]; - snprintf(buf, sizeof(buf), "arg%u-dot-prefix", c->type - BUS_MATCH_ARG_NAMESPACE); + xsprintf(buf, "arg%i-dot-prefix", c->type - BUS_MATCH_ARG_NAMESPACE); bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, buf, c->value_str); using_bloom = true; break; @@ -1359,7 +1359,7 @@ int bus_add_match_internal_kernel( #define internal_match(bus, m) \ ((bus)->hello_flags & KDBUS_HELLO_MONITOR \ - ? (isempty(m) ? "eavesdrop='true'" : strappenda((m), ",eavesdrop='true'")) \ + ? (isempty(m) ? "eavesdrop='true'" : strjoina((m), ",eavesdrop='true'")) \ : (m)) static int bus_add_match_internal_dbus1(