diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-03-20 16:58:09 +0000 | 
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-03-20 16:58:09 +0000 | 
| commit | fd4a0b92db6a57cba8d03efbe1cebf91f9124ce0 (patch) | |
| tree | 5886a08bfa1132058b06074f4666a36dc5ddd2a1 /scripts/mod | |
| parent | 88274815f7477dc7550439413ab87c5ce4c5a623 (diff) | |
| parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'scripts/mod')
| -rw-r--r-- | scripts/mod/modpost.c | 9 | 
1 files changed, 2 insertions, 7 deletions
| diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f70ff13d481..b8b2a560b26 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -508,12 +508,7 @@ buf_printf(struct buffer *buf, const char *fmt, ...)  	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);  } @@ -521,7 +516,7 @@ 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); | 
