From 082b0040211fd725f7581ca4e356759dcabf482f Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 2 Nov 2020 15:38:02 +0100 Subject: [PATCH] add --- cv5/a_train.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index 2708199..6bb2933 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -9,11 +9,10 @@ struct car* add_car(struct car* first,const char* target) { if(target == NULL){ return 0; } + struct car* newcar = calloc(1, sizeof(struct car)); if(first == NULL){ return newcar; } - - struct car* newcar = calloc(1, sizeof(struct car)); strcpy(newcar->value, target); struct car *this = first;