提交 14a036d2 编写于 作者: S Sam Ravnborg 提交者: Sam Ravnborg

kbuild: replace use of strlcpy with a dedicated implmentation in unifdef

Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
上级 01f1c879
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册