summaryrefslogtreecommitdiff
path: root/src/xdg-autostart-generator
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-09 13:27:03 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-09 15:07:40 +0200
commite437538f35e09f8caa3de6ca905da1f134aef5bb (patch)
tree9e642f08bf6f38af098dfab336d5e717d599ffdc /src/xdg-autostart-generator
parentddedf7ca69fef93374645aa3146941711eb30688 (diff)
downloadsystemd-e437538f35e09f8caa3de6ca905da1f134aef5bb.tar.gz
tree-wide: make cunescape*() functions return ssize_t
Strictly speaking, we are returning the size of a memory chunk of arbitrary size, so ssize_t is more appropriate than int.
Diffstat (limited to 'src/xdg-autostart-generator')
-rw-r--r--src/xdg-autostart-generator/xdg-autostart-service.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xdg-autostart-generator/xdg-autostart-service.c b/src/xdg-autostart-generator/xdg-autostart-service.c
index fe73bfe9db..d6e90302fd 100644
--- a/src/xdg-autostart-generator/xdg-autostart-service.c
+++ b/src/xdg-autostart-generator/xdg-autostart-service.c
@@ -397,10 +397,11 @@ int xdg_autostart_format_exec_start(
first_arg = true;
for (i = n = 0; exec_split[i]; i++) {
_cleanup_free_ char *c = NULL, *raw = NULL, *p = NULL, *escaped = NULL, *quoted = NULL;
+ ssize_t l;
- r = cunescape(exec_split[i], 0, &c);
- if (r < 0)
- return log_debug_errno(r, "Failed to unescape '%s': %m", exec_split[i]);
+ l = cunescape(exec_split[i], 0, &c);
+ if (l < 0)
+ return log_debug_errno(l, "Failed to unescape '%s': %m", exec_split[i]);
if (first_arg) {
_cleanup_free_ char *executable = NULL;