This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16-epplets.
View the commit online.
commit 1ee805ce65d3cef3e68a42838a77f7fd41f77d1e
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sun Dec 10 15:34:18 2023 +0100
api: Simplify Estrdup()
Assume we have strdup() like everywhere else in the epplets code.
---
api/epplet.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/api/epplet.c b/api/epplet.c
index 9689df1..1c2c1e7 100644
--- a/api/epplet.c
+++ b/api/epplet.c
@@ -1892,15 +1892,7 @@ Epplet_get_color(int r, int g, int b)
static char *
Estrdup(const char *s)
{
- char *ss;
- int len;
-
- if (!s)
- return NULL;
- len = strlen(s);
- ss = malloc(len + 1);
- memcpy(ss, s, len + 1);
- return ss;
+ return s ? strdup(s) : NULL;
}
static char *
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.