add
This commit is contained in:
parent
0394b3b269
commit
3a019b60f2
@ -11,6 +11,9 @@ struct car* add_car(struct car* first,const char* target) {
|
|||||||
if(first == NULL){
|
if(first == NULL){
|
||||||
return newcar;
|
return newcar;
|
||||||
}
|
}
|
||||||
|
if(target == NULL){
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
struct car *this = first;
|
struct car *this = first;
|
||||||
while(this->next != NULL){
|
while(this->next != NULL){
|
||||||
this = this->next;
|
this = this->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user