From 6a1d8dad19555ab716ac67e11ac77fcc756f7705 Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Tue, 1 Oct 2024 20:18:58 +0000 Subject: [PATCH] Update cv1/program.c --- cv1/program.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cv1/program.c b/cv1/program.c index 58f9c68..d39af6f 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -4,16 +4,17 @@ #include // bool check(char* s2, char *pz) -{ +{ + char s[300]; if(s2==NULL || pz==NULL) { return false; } - char *s=(char*) malloc(strlen(s2)+1); - if(s==NULL) - { - return false; - } + // char *s=(char*) malloc(strlen(s2)+1); + // if(s==NULL) + // { + // return false; + // } char shifer[15]="oizeasbtbq"; for(int i = 0; s2[i]!='\0'; i++) @@ -28,7 +29,7 @@ bool check(char* s2, char *pz) } s[strlen(s2)]=0; bool rez=strstr(s, pz)!=NULL; - free(s); + //free(s); return rez; }