git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
[pandora-kernel.git]
/
scripts
/
mod
/
modpost.c
diff --git
a/scripts/mod/modpost.c
b/scripts/mod/modpost.c
index
30f3ac8
..
0b92ddf
100644
(file)
--- a/
scripts/mod/modpost.c
+++ b/
scripts/mod/modpost.c
@@
-923,19
+923,14
@@
void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
va_start(ap, fmt);
len = vsnprintf(tmp, SZ, fmt, ap);
va_start(ap, fmt);
len = vsnprintf(tmp, SZ, fmt, ap);
- if (buf->size - buf->pos < len + 1) {
- buf->size += 128;
- buf->p = realloc(buf->p, buf->size);
- }
- strncpy(buf->p + buf->pos, tmp, len + 1);
- buf->pos += len;
+ buf_write(buf, tmp, len);
va_end(ap);
}
void buf_write(struct buffer *buf, const char *s, int len)
{
if (buf->size - buf->pos < len) {
va_end(ap);
}
void buf_write(struct buffer *buf, const char *s, int len)
{
if (buf->size - buf->pos < len) {
- buf->size += len;
+ buf->size += len
+ SZ
;
buf->p = realloc(buf->p, buf->size);
}
strncpy(buf->p + buf->pos, s, len);
buf->p = realloc(buf->p, buf->size);
}
strncpy(buf->p + buf->pos, s, len);