Learn to do pointer arithmatic (doh!)

This commit is contained in:
Brian Somers 1999-12-18 02:31:36 +00:00
parent a4415a1c07
commit aa4e734249
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54766

View file

@ -165,7 +165,7 @@ mbuf_Prepend(struct mbuf *bp, const void *ptr, size_t len, size_t extra)
return bp;
}
len -= bp->offset;
memcpy(bp + sizeof *bp, (const char *)ptr + len, bp->offset);
memcpy(bp + 1, (const char *)ptr + len, bp->offset);
bp->cnt += bp->offset;
bp->offset = 0;
}