Fossil SCM

Replaced a call to realloc() with cson_realloc() (which, in turn, uses the fossil realloc).

stephan 2013-02-12 11:53 trunk
Commit a1d2cd84b8a66dba4277a461c15d0b80f1025e5f
1 file changed +1 -1
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -4349,11 +4349,11 @@
43494349
{
43504350
return 0;
43514351
}
43524352
else
43534353
{
4354
- unsigned char * x = (unsigned char *)realloc( buf->mem, n );
4354
+ unsigned char * x = (unsigned char *)cson_realloc( buf->mem, n, "cson_buffer::mem" );
43554355
if( ! x ) return cson_rc.AllocError;
43564356
memset( x + buf->used, 0, n - buf->used );
43574357
buf->mem = x;
43584358
buf->capacity = n;
43594359
++buf->timesExpanded;
43604360
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -4349,11 +4349,11 @@
4349 {
4350 return 0;
4351 }
4352 else
4353 {
4354 unsigned char * x = (unsigned char *)realloc( buf->mem, n );
4355 if( ! x ) return cson_rc.AllocError;
4356 memset( x + buf->used, 0, n - buf->used );
4357 buf->mem = x;
4358 buf->capacity = n;
4359 ++buf->timesExpanded;
4360
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -4349,11 +4349,11 @@
4349 {
4350 return 0;
4351 }
4352 else
4353 {
4354 unsigned char * x = (unsigned char *)cson_realloc( buf->mem, n, "cson_buffer::mem" );
4355 if( ! x ) return cson_rc.AllocError;
4356 memset( x + buf->used, 0, n - buf->used );
4357 buf->mem = x;
4358 buf->capacity = n;
4359 ++buf->timesExpanded;
4360

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button