Initialize struct class->name in the constructor if no name was

informed.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2006-10-28 13:16:59 -03:00
parent 23cc5e41cb
commit 7f5ce05961
1 changed files with 1 additions and 0 deletions

View File

@ -246,6 +246,7 @@ struct class *class__new(const unsigned int tag,
self->type.cu = cu;
self->type.offset = type;
self->size = size;
self->name[0] = '\0';
if (name != NULL)
strncpy(self->name, name, sizeof(self->name));
self->decl_file = decl_file;