coccinelle: automatically switch some uses of memcpy() → mempcpy()

Inspired by #22520, let's add a coccinelle script that converts this
automatically.
This commit is contained in:
Lennart Poettering
2022-02-16 17:26:26 +01:00
parent bde335f21f
commit 96ca229517
3 changed files with 18 additions and 9 deletions
+1 -2
View File
@@ -683,8 +683,7 @@ static int base64_append_width(
s += indent;
}
memcpy(s, x + width * line, act);
s += act;
s = mempcpy(s, x + width * line, act);
*(s++) = line < lines - 1 ? '\n' : '\0';
avail -= act;
}