Chameleon

Chameleon Commit Details

Date:2014-01-07 08:23:09 (10 years 3 months ago)
Author:Chuck Fry
Commit:2295
Parents: 2294
Message:append_string(): fix cppcheck errors
Changes:
M/branches/chucko/i386/config/lex.zconf.c

File differences

branches/chucko/i386/config/lex.zconf.c
820820
821821
822822
823
824823
825
826
827
828
824
825
826
827
828
829
830
831
829832
830833
831834
static void append_string(const char *str, int size)
{
int new_size = text_size + size + 1;
if (new_size > text_asize) {
new_size += START_STRSIZE - 1;
new_size &= -START_STRSIZE;
text = realloc(text, new_size);
text_asize = new_size;
int new_size = text_size + size + 1;
char* new_text = NULL;
new_size += START_STRSIZE - 1;
new_size &= -START_STRSIZE;
if (!(new_text = realloc(text, new_size)))
return;
text = new_text;
text_asize = new_size;
}
memcpy(text + text_size, str, size);
text_size += size;

Archive Download the corresponding diff file

Revision: 2295