summaryrefslogtreecommitdiff
path: root/src/lib/eina
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/eina
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/eina')
-rw-r--r--src/lib/eina/eina_inline_slice.x4
-rw-r--r--src/lib/eina/eina_slice.h2
-rw-r--r--src/lib/eina/eina_str.h1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/eina/eina_inline_slice.x b/src/lib/eina/eina_inline_slice.x
index f0188bd..e11a468 100644
--- a/src/lib/eina/eina_inline_slice.x
+++ b/src/lib/eina/eina_inline_slice.x
@@ -246,7 +246,7 @@ static inline char *
246eina_slice_strdup(const Eina_Slice slice) 246eina_slice_strdup(const Eina_Slice slice)
247{ 247{
248 if (slice.len != 0) 248 if (slice.len != 0)
249 return strndup((const char *)slice.mem, slice.len); 249 return eina_strndup((const char *)slice.mem, slice.len);
250 return strdup(""); 250 return strdup("");
251} 251}
252 252
@@ -254,7 +254,7 @@ static inline char *
254eina_rw_slice_strdup(const Eina_Rw_Slice rw_slice) 254eina_rw_slice_strdup(const Eina_Rw_Slice rw_slice)
255{ 255{
256 if (rw_slice.len != 0) 256 if (rw_slice.len != 0)
257 return strndup((const char *)rw_slice.mem, rw_slice.len); 257 return eina_strndup((const char *)rw_slice.mem, rw_slice.len);
258 return strdup(""); 258 return strdup("");
259} 259}
260 260
diff --git a/src/lib/eina/eina_slice.h b/src/lib/eina/eina_slice.h
index fab84e9..a354eaa 100644
--- a/src/lib/eina/eina_slice.h
+++ b/src/lib/eina/eina_slice.h
@@ -28,6 +28,8 @@
28 28
29#include <sys/types.h> 29#include <sys/types.h>
30 30
31#include "eina_str.h"
32
31/** 33/**
32 * @addtogroup Eina_Slice_Group Memory Slices 34 * @addtogroup Eina_Slice_Group Memory Slices
33 * 35 *
diff --git a/src/lib/eina/eina_str.h b/src/lib/eina/eina_str.h
index c7d7e4e..961ac58 100644
--- a/src/lib/eina/eina_str.h
+++ b/src/lib/eina/eina_str.h
@@ -3,6 +3,7 @@
3 3
4#include <stddef.h> 4#include <stddef.h>
5#include <string.h> 5#include <string.h>
6#include <time.h>
6 7
7#include "eina_types.h" 8#include "eina_types.h"
8 9