summaryrefslogtreecommitdiffstats
path: root/src/shared/serialize.c
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/shared/serialize.c
parentbasic/escape: use _cleanup_ in one more place (diff)
downloadsystemd-e437538f35e09f8caa3de6ca905da1f134aef5bb.tar.xz
systemd-e437538f35e09f8caa3de6ca905da1f134aef5bb.zip
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/shared/serialize.c')
-rw-r--r--src/shared/serialize.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shared/serialize.c b/src/shared/serialize.c
index 23aac3ef52..47996b9ead 100644
--- a/src/shared/serialize.c
+++ b/src/shared/serialize.c
@@ -176,6 +176,7 @@ int deserialize_dual_timestamp(const char *value, dual_timestamp *t) {
int deserialize_environment(const char *value, char ***list) {
_cleanup_free_ char *unescaped = NULL;
+ ssize_t l;
int r;
assert(value);
@@ -183,9 +184,9 @@ int deserialize_environment(const char *value, char ***list) {
/* Changes the *environment strv inline. */
- r = cunescape(value, 0, &unescaped);
- if (r < 0)
- return log_error_errno(r, "Failed to unescape: %m");
+ l = cunescape(value, 0, &unescaped);
+ if (l < 0)
+ return log_error_errno(l, "Failed to unescape: %m");
r = strv_env_replace_consume(list, TAKE_PTR(unescaped));
if (r < 0)