17%
This commit is contained in:
parent
faa298fa9e
commit
3ac07444f5
@ -15,6 +15,7 @@
|
||||
struct car* add_car(struct car* first,const char* target) {
|
||||
struct car* newcar = calloc(1,sizeof(struct car));
|
||||
struct car* this=first;
|
||||
strcpy(newcar->value, target);
|
||||
if(this==NULL){
|
||||
return newcar;
|
||||
}
|
||||
@ -22,7 +23,6 @@ struct car* add_car(struct car* first,const char* target) {
|
||||
this=this->next;
|
||||
}
|
||||
this->next = newcar;
|
||||
strcpy(newcar->value, target);
|
||||
return first;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user