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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user