Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21087
b: refs/heads/master
c: 7670f02
h: refs/heads/master
i:
  21085: 3b2dd95
  21083: b3445a7
  21079: 995b3fb
  21071: 3b88f36
  21055: e73c900
v: v3
  • Loading branch information
Sam Ravnborg authored and Linus Torvalds committed Mar 17, 2006
1 parent b7ce09c commit 208165a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85c6932ef0c7a82c309f8728ddf29768001d794e
refs/heads/master: 7670f023aabd976c25862e4c6fb9f6d9d2758153
9 changes: 2 additions & 7 deletions trunk/scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,20 +508,15 @@ 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);
}

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);
Expand Down

0 comments on commit 208165a

Please sign in to comment.