1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

specifier: use mempcpy() where we can

This commit is contained in:
Lennart Poettering 2023-12-18 10:24:50 +01:00
parent fd7e988700
commit d393666403

View File

@ -78,8 +78,7 @@ int specifier_printf(const char *text, size_t max_length, const Specifier table[
if (!GREEDY_REALLOC(result, j + k + l + 1))
return -ENOMEM;
memcpy(result + j, w, k);
t = result + j + k;
t = mempcpy(result + j, w, k);
} else if (strchr(POSSIBLE_SPECIFIERS, *f))
/* Oops, an unknown specifier. */
return -EBADSLT;