summaryrefslogtreecommitdiff
path: root/src/shared/bpf-program.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/bpf-program.c
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/shared/bpf-program.c')
-rw-r--r--src/shared/bpf-program.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shared/bpf-program.c b/src/shared/bpf-program.c
index 0f865a7168..4575bb4e2f 100644
--- a/src/shared/bpf-program.c
+++ b/src/shared/bpf-program.c
@@ -426,6 +426,7 @@ int bpf_program_deserialize_attachment(const char *v, FDSet *fds, BPFProgram **b
_cleanup_free_ char *sfd = NULL, *sat = NULL, *unescaped = NULL;
_cleanup_(bpf_program_unrefp) BPFProgram *p = NULL;
_cleanup_close_ int fd = -1;
+ ssize_t l;
int ifd, at, r;
assert(v);
@@ -456,9 +457,9 @@ int bpf_program_deserialize_attachment(const char *v, FDSet *fds, BPFProgram **b
return at;
/* The rest is the path */
- r = cunescape(v, 0, &unescaped);
- if (r < 0)
- return r;
+ l = cunescape(v, 0, &unescaped);
+ if (l < 0)
+ return l;
fd = fdset_remove(fds, ifd);
if (fd < 0)