add
This commit is contained in:
parent
da2607343b
commit
082b004021
@ -9,11 +9,10 @@ struct car* add_car(struct car* first,const char* target) {
|
|||||||
if(target == NULL){
|
if(target == NULL){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
struct car* newcar = calloc(1, sizeof(struct car));
|
||||||
if(first == NULL){
|
if(first == NULL){
|
||||||
return newcar;
|
return newcar;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct car* newcar = calloc(1, sizeof(struct car));
|
|
||||||
strcpy(newcar->value, target);
|
strcpy(newcar->value, target);
|
||||||
|
|
||||||
struct car *this = first;
|
struct car *this = first;
|
||||||
|
Loading…
Reference in New Issue
Block a user