mirror of
https://github.com/fairyglade/ly
synced 2024-11-16 00:12:58 +00:00
removed strdup implementation
This commit is contained in:
parent
c60374d361
commit
87369c766f
13
src/utils.c
13
src/utils.c
@ -51,19 +51,6 @@ char* trim(char* s)
|
||||
return s;
|
||||
}
|
||||
|
||||
char* strdup(const char* src)
|
||||
{
|
||||
size_t len = strlen(src) + 1;
|
||||
char* s = malloc(len);
|
||||
|
||||
if(!s)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (char*)memcpy(s, src, len);
|
||||
}
|
||||
|
||||
void error_init(WINDOW* win, int width, const char* s)
|
||||
{
|
||||
static WINDOW* win_stack = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user