mirror of
https://gitlab.com/klmp200/LO41.git
synced 2025-07-10 19:59:24 +00:00
Petite optimisation
This commit is contained in:
@ -16,9 +16,7 @@ void _free__Visitor(THIS(Visitor)){
|
||||
|
||||
Visitor *_init_Visitor(int id, char* name){
|
||||
Visitor * new_visitor = malloc_or_die(sizeof(Visitor));
|
||||
size_t len = strlen(name);
|
||||
new_visitor->name = malloc_or_die(sizeof(char) * len);
|
||||
strcpy(new_visitor->name, name);
|
||||
new_visitor->name = strdup(name);
|
||||
new_visitor->id = id;
|
||||
new_visitor->contact_id = -1;
|
||||
new_visitor->position = 0;
|
||||
|
Reference in New Issue
Block a user