projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01f1c87
)
kbuild: replace use of strlcpy with a dedicated implmentation in unifdef
author
Sam Ravnborg
<sam@mars.ravnborg.org>
Sun, 23 Jul 2006 18:41:30 +0000
(20:41 +0200)
committer
Sam Ravnborg
<sam@neptun.ravnborg.org>
Mon, 25 Sep 2006 07:00:00 +0000
(09:00 +0200)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/unifdef.c
patch
|
blob
|
blame
|
history
diff --git
a/scripts/unifdef.c
b/scripts/unifdef.c
index 5384b4377333abdfad975e7c2293f92bbf43e6f1..552025e72acb1341923bfb471547189419567844 100644
(file)
--- a/
scripts/unifdef.c
+++ b/
scripts/unifdef.c
@@
-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