summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-07-05 09:07:22 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-07-05 09:07:22 +0200
commit656db09805cbff0b6af3c34f611b710116df4b82 (patch)
tree566e317c4afdf604e2ffb53098ff469a35eb0e6c
parent96acaa2b5732a7685725b5c46045eda3375a3839 (diff)
parent5c745cccbe1774780f499e5cc979eb77d2aac5c7 (diff)
downloadouroboros-656db09805cbff0b6af3c34f611b710116df4b82.tar.gz
ouroboros-656db09805cbff0b6af3c34f611b710116df4b82.zip
Merged in dstaesse/ouroboros/be-deprecate-strdup (pull request #153)
Be deprecate strdup
-rw-r--r--src/ipcpd/ipcp-data.c5
-rw-r--r--src/lib/irm.c2
-rw-r--r--src/lib/utils.c19
3 files changed, 4 insertions, 22 deletions
diff --git a/src/ipcpd/ipcp-data.c b/src/ipcpd/ipcp-data.c
index 76fc4bcd..8dc708b2 100644
--- a/src/ipcpd/ipcp-data.c
+++ b/src/ipcpd/ipcp-data.c
@@ -21,15 +21,16 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "ipcp-data.h"
+#include <ouroboros/config.h>
#include <ouroboros/shm_du_map.h>
#include <ouroboros/list.h>
-#include <ouroboros/utils.h>
#define OUROBOROS_PREFIX "ipcp-utils"
#include <ouroboros/logs.h>
+#include "ipcp-data.h"
+
#include <string.h>
#include <stdlib.h>
diff --git a/src/lib/irm.c b/src/lib/irm.c
index 68ffdf03..8f475e38 100644
--- a/src/lib/irm.c
+++ b/src/lib/irm.c
@@ -22,12 +22,12 @@
#define OUROBOROS_PREFIX "libouroboros-irm"
+#include <ouroboros/config.h>
#include <ouroboros/errno.h>
#include <ouroboros/irm.h>
#include <ouroboros/common.h>
#include <ouroboros/logs.h>
#include <ouroboros/sockets.h>
-#include <ouroboros/utils.h>
#include <string.h>
#include <stdlib.h>
diff --git a/src/lib/utils.c b/src/lib/utils.c
index 49065138..acaf1176 100644
--- a/src/lib/utils.c
+++ b/src/lib/utils.c
@@ -35,25 +35,6 @@ int n_digits(unsigned i)
return n;
}
-char * strdup(const char * src)
-{
- int len = 0;
- char * dst = NULL;
-
- if (src == NULL)
- return NULL;
-
- len = strlen(src) + 1;
-
- dst = malloc(len);
- if (dst == NULL)
- return NULL;
-
- memcpy(dst, src, len);
-
- return dst;
-}
-
char * path_strip(char * src)
{
char * dst = NULL;