diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-04-07 15:59:27 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-04-07 16:04:52 +0200 |
commit | 1b09b81cf4296487094f86e75c4ab14bf5701e59 (patch) | |
tree | 14eebe23c63a3254c708fb33c56e890abcc4a3cc /src/shared/bus-message-util.c | |
parent | 7756528e9bb79394c87d9161761e67e16eb2c47b (diff) | |
download | systemd-1b09b81cf4296487094f86e75c4ab14bf5701e59.tar.gz |
tree-wide: sd_bus_error_setf → set_bus_error_set
strdup() is more efficient than asprintf().
Diffstat (limited to 'src/shared/bus-message-util.c')
-rw-r--r-- | src/shared/bus-message-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/bus-message-util.c b/src/shared/bus-message-util.c index 565560c6be..14a4a4cfd6 100644 --- a/src/shared/bus-message-util.c +++ b/src/shared/bus-message-util.c @@ -17,7 +17,7 @@ int bus_message_read_ifindex(sd_bus_message *message, sd_bus_error *error, int * return r; if (ifindex <= 0) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid interface index"); + return sd_bus_error_set(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid interface index"); *ret = ifindex; @@ -62,7 +62,7 @@ int bus_message_read_in_addr_auto(sd_bus_message *message, sd_bus_error *error, return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unknown address family %i", family); if (sz != FAMILY_ADDRESS_SIZE(family)) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid address size"); + return sd_bus_error_set(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid address size"); if (ret_family) *ret_family = family; @@ -99,7 +99,7 @@ static int bus_message_read_dns_one( return r; if (!dns_server_address_valid(family, &a)) { - r = sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid DNS server address"); + r = sd_bus_error_set(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid DNS server address"); assert(r < 0); return r; } |