summaryrefslogtreecommitdiff
path: root/src/lib/evil/evil_string.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-05-03 13:09:07 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-05-03 13:13:57 +0100
commit7db4714db6ed4e540e1048692f29f3ea1f2b88ed (patch)
tree1b5099c40d8afa89cf6586d200599883535180e6 /src/lib/evil/evil_string.c
parent7047a056abb6e44811f12bab37546bdfb1ad98ab (diff)
replace strndup with eina_strndup, remove strndup definition in evil and elm_test_dnd
Test Plan: compilation Reviewers: cedric, zmike, raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8814
Diffstat (limited to 'src/lib/evil/evil_string.c')
-rw-r--r--src/lib/evil/evil_string.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/lib/evil/evil_string.c b/src/lib/evil/evil_string.c
index 08ab2d7..3620ce5 100644
--- a/src/lib/evil/evil_string.c
+++ b/src/lib/evil/evil_string.c
@@ -11,24 +11,10 @@
11 11
12 12
13/* 13/*
14 * bit related functions 14 * string related functions
15 * 15 *
16 */ 16 */
17 17
18char *
19strndup(const char *str, size_t n)
20{
21 size_t slen = strnlen(str, n);
22 char *ret;
23
24 ret = malloc (slen + 1);
25 if (!ret) return NULL;
26
27 if (slen > 0) memcpy(ret, str, slen);
28 ret[slen] = '\0';
29 return ret;
30}
31
32char *strcasestr(const char *haystack, const char *needle) 18char *strcasestr(const char *haystack, const char *needle)
33{ 19{
34 size_t length_needle; 20 size_t length_needle;