This commit is contained in:
Maryna Kravtsova 2020-10-26 19:29:25 +01:00
parent 960491964c
commit 0d8ada0d9d

View File

@ -7,6 +7,7 @@
struct car* add_car(struct car* first,const char* target) { struct car* add_car(struct car* first,const char* target) {
struct car* newcar = calloc(1, sizeof(struct car)); struct car* newcar = calloc(1, sizeof(struct car));
strcpy(newcar->value, target); strcpy(newcar->value, target);
newcar->next = first;
if(first == NULL){ if(first == NULL){
return newcar; return newcar;
} }