scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

commit a6f66e1592b3224b5c95660906a1a7e829d884f3
parent a602405535efb9cb9dc065e851c67f1d00cfc8ea
Author: sin <sin@2f30.org>
Date:   Fri,  2 Aug 2013 10:26:25 +0100

Fix comments

Diffstat:
Mrandom/rballoc.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/random/rballoc.c b/random/rballoc.c @@ -193,10 +193,11 @@ realloc(void *oldp, size_t siz) newan = RB_REMOVE(free_tree, &ft, res); RB_INSERT(alloc_tree, &at, newan); } - /* Copy over the contents at `oldp' */ + /* Copy over the contents from `oldp' to the + * new memory block */ memcpy(newan->buf, oldan->buf, siz < oldan->siz ? siz : oldan->siz); - /* Free `oldp' */ + /* Return `oldp' to the free tree */ n.buf = oldan; res = RB_FIND(alloc_tree, &at, &n); if (res) {