This commit is contained in:
Radovan Kofira 2020-11-05 21:01:30 +01:00
parent b96f4e3d88
commit eaed9eda90

View File

@ -16,7 +16,7 @@ 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));
struct car* this=first; struct car* this=first;
strcpy(newcar->value, target); strcpy(newcar->value, target);
if(this==NULL){ if(first==NULL){
return newcar; return newcar;
} }
while(this->next!=NULL){ while(this->next!=NULL){