*初始化两个maat能命中版本

This commit is contained in:
fengweihao
2020-01-17 10:59:34 +08:00
parent 3308970cdc
commit 7740e213da
6 changed files with 429 additions and 190 deletions

View File

@@ -0,0 +1,18 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
char* rt_strdup(const char* s)
{
char*d=NULL;
if(s==NULL)
{
return NULL;
}
d=(char*)malloc(strlen(s)+1);
memcpy(d,s,strlen(s)+1);
return d;
}