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/machine/image-dbus.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/machine/image-dbus.c')
-rw-r--r-- | src/machine/image-dbus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/machine/image-dbus.c b/src/machine/image-dbus.c index 309de0b116..e6ffb52924 100644 --- a/src/machine/image-dbus.c +++ b/src/machine/image-dbus.c @@ -41,7 +41,7 @@ int bus_image_method_remove( assert(image); if (m->n_operations >= OPERATIONS_MAX) - return sd_bus_error_setf(error, SD_BUS_ERROR_LIMITS_EXCEEDED, "Too many ongoing operations."); + return sd_bus_error_set(error, SD_BUS_ERROR_LIMITS_EXCEEDED, "Too many ongoing operations."); r = bus_verify_polkit_async( message, @@ -146,7 +146,7 @@ int bus_image_method_clone( assert(m); if (m->n_operations >= OPERATIONS_MAX) - return sd_bus_error_setf(error, SD_BUS_ERROR_LIMITS_EXCEEDED, "Too many ongoing operations."); + return sd_bus_error_set(error, SD_BUS_ERROR_LIMITS_EXCEEDED, "Too many ongoing operations."); r = sd_bus_message_read(message, "sb", &new_name, &read_only); if (r < 0) @@ -252,7 +252,7 @@ int bus_image_method_set_limit( if (r < 0) return r; if (!FILE_SIZE_VALID_OR_INFINITY(limit)) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "New limit out of range"); + return sd_bus_error_set(error, SD_BUS_ERROR_INVALID_ARGS, "New limit out of range"); r = bus_verify_polkit_async( message, |