remove estrdup and move notification to client side

This commit is contained in:
Night Kaly 2024-09-25 21:21:57 +01:00
parent 1420f9e5e0
commit 396201512d
Signed by: night0721
GPG key ID: 957D67B8DB7A119B
3 changed files with 0 additions and 11 deletions

View file

@ -8,7 +8,6 @@
void error(int fatal, const char *fmt, ...);
void *memalloc(size_t size);
void *estrdup(void *str);
char *replace_home(char *str);
void mkdir_p(const char *file);
void write_log(int type, const char *fmt, ...);

View file

@ -46,16 +46,6 @@ void *memalloc(size_t size)
return ptr;
}
void *estrdup(void *str)
{
void *modstr = strdup(str);
if (modstr == NULL) {
write_log(LOG_ERROR, "Error allocating memory");
return NULL;
}
return modstr;
}
/*
* Takes heap-allocated str and replace ~ with home path
* Returns heap-allocated newstr