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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-07-09 15:07:40 +02:00
parent ddedf7ca69
commit e437538f35
21 changed files with 112 additions and 109 deletions
+4 -2
View File
@@ -220,9 +220,11 @@ int devnode_acl_all(const char *seat,
if (dir) {
FOREACH_DIRENT(dent, dir, return -errno) {
_cleanup_free_ char *unescaped_devname = NULL;
ssize_t l;
if (cunescape(dent->d_name, UNESCAPE_RELAX, &unescaped_devname) < 0)
return -ENOMEM;
l = cunescape(dent->d_name, UNESCAPE_RELAX, &unescaped_devname);
if (l < 0)
return l;
n = path_join("/dev", unescaped_devname);
if (!n)