This commit is contained in:
Radovan Kofira 2020-11-05 20:01:54 +01:00
parent d94925e6ed
commit 2ea871a21c
2 changed files with 1 additions and 2 deletions

View File

@ -15,11 +15,10 @@
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));
struct car* this=first; struct car* this=first;
int length=0;
if(this==NULL){ if(this==NULL){
return newcar; return newcar;
} }
else(this->next!=NULL){ while(this->next!=NULL){
this=this->next; this=this->next;
this->next = newcar; this->next = newcar;
} }

Binary file not shown.