make STRDUP and STRNDUP static
This commit is contained in:
parent
bc951780ab
commit
63793f92ef
1 changed files with 2 additions and 2 deletions
4
toml.c
4
toml.c
|
@ -58,7 +58,7 @@ void toml_set_memutil(void* (*xxmalloc)(size_t),
|
||||||
#define CALLOC(a,b) ppcalloc(a,b)
|
#define CALLOC(a,b) ppcalloc(a,b)
|
||||||
#define REALLOC(a,b) pprealloc(a,b)
|
#define REALLOC(a,b) pprealloc(a,b)
|
||||||
|
|
||||||
char* STRDUP(const char* s)
|
static char* STRDUP(const char* s)
|
||||||
{
|
{
|
||||||
int len = strlen(s);
|
int len = strlen(s);
|
||||||
char* p = MALLOC(len+1);
|
char* p = MALLOC(len+1);
|
||||||
|
@ -69,7 +69,7 @@ char* STRDUP(const char* s)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* STRNDUP(const char* s, size_t n)
|
static char* STRNDUP(const char* s, size_t n)
|
||||||
{
|
{
|
||||||
size_t len = strnlen(s, n);
|
size_t len = strnlen(s, n);
|
||||||
char* p = MALLOC(len+1);
|
char* p = MALLOC(len+1);
|
||||||
|
|
Loading…
Reference in a new issue