From 396201512da1de86db0486e637eebcfed9148d0a Mon Sep 17 00:00:00 2001 From: night0721 Date: Wed, 25 Sep 2024 21:21:57 +0100 Subject: [PATCH] remove estrdup and move notification to client side --- include/util.h | 1 - src/lib/util.c | 10 ---------- src/{lib => zen}/notification.c | 0 3 files changed, 11 deletions(-) rename src/{lib => zen}/notification.c (100%) diff --git a/include/util.h b/include/util.h index 2515acf..47a270b 100644 --- a/include/util.h +++ b/include/util.h @@ -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, ...); diff --git a/src/lib/util.c b/src/lib/util.c index 9743a90..241c8b3 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -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 diff --git a/src/lib/notification.c b/src/zen/notification.c similarity index 100% rename from src/lib/notification.c rename to src/zen/notification.c