mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +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
f8a989439b
commit
064d124e19
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