mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
kbuild: replace use of strlcpy with a dedicated implmentation in unifdef
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
committed by
Sam Ravnborg
parent
01f1c8799a
commit
14a036d2dc
@@ -450,7 +450,14 @@ ignoreon(void)
|
||||
static void
|
||||
keywordedit(const char *replacement)
|
||||
{
|
||||
strlcpy(keyword, replacement, tline + sizeof(tline) - keyword);
|
||||
size_t size = tline + sizeof(tline) - keyword;
|
||||
char *dst = keyword;
|
||||
const char *src = replacement;
|
||||
if (size != 0) {
|
||||
while ((--size != 0) && (*src != '\0'))
|
||||
*dst++ = *src++;
|
||||
*dst = '\0';
|
||||
}
|
||||
print();
|
||||
}
|
||||
static void
|
||||
|
Reference in New Issue
Block a user