mirror of
https://github.com/troglobit/finit.git
synced 2026-10-18 10:59:34 +00:00
Refactor, add new helper fn paste() to concat directory compoents
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
6f06c432ec
commit
a1f79e263a
5 files changed
+19
-8
No files matched your search
@@ -62,7 +62,7 @@ static inline char *pid_runpath(const char *file, char *path, size_t len)
|
||||
else if (!strncmp(file, "/run/", 5))
|
||||
file += 5;
|
||||
|
||||
rc = snprintf(path, len, "%s/%s", prefix, file);
|
||||
rc = paste(path, len, prefix, file);
|
||||
if (rc < 0 || (size_t)rc >= len)
|
||||
_e("File path '%s' truncated, should end with '%s'", path, file);
|
||||
|
||||
|
||||
Reference in new issue
Block a user