diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-09-19 23:08:42 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-09-20 01:29:35 +0200 |
commit | eda6223942a172fa6777901cf5fbd47438f285ce (patch) | |
tree | f0277cf8788d4141b7652ca8bc5b6110a49a0d68 /src/tmpfiles | |
parent | boot: use INC_SAFE where appropriate (diff) | |
download | systemd-eda6223942a172fa6777901cf5fbd47438f285ce.tar.xz systemd-eda6223942a172fa6777901cf5fbd47438f285ce.zip |
basic/memory-util: introduce mempcpy_typesafe
Diffstat (limited to 'src/tmpfiles')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 16f831bc26..12fb5f50f0 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -2756,7 +2756,7 @@ static int mkdir_parents_rm_if_wrong_type(mode_t child_mode, const char *path) { e = s + strcspn(s, "/"); /* Copy the path component to t so it can be a null terminated string. */ - *((char*) mempcpy(t, s, e - s)) = 0; + *mempcpy_typesafe(t, s, e - s) = 0; /* Is this the last component? If so, then check the type */ if (*e == 0) |