add
This commit is contained in:
parent
082b004021
commit
5202a7ff7f
@ -6,10 +6,12 @@
|
|||||||
#include "a_train.h"
|
#include "a_train.h"
|
||||||
|
|
||||||
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));
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user