Explorar o código

remove shm_str_dup() from tls_util.[c|h] as it breaks compilation and is not used at all

Klaus Darilion %!s(int64=16) %!d(string=hai) anos
pai
achega
07afde0840
Modificáronse 2 ficheiros con 0 adicións e 34 borrados
  1. 0 26
      modules_s/tls/tls_util.c
  2. 0 8
      modules_s/tls/tls_util.h

+ 0 - 26
modules_s/tls/tls_util.c

@@ -39,32 +39,6 @@
 #include "tls_util.h"
 
 
-/*
- * Make a shared memory copy of str string
- * Return value: -1 on error
- *                0 on success
- */
-int shm_str_dup(char** dest, str* val)
-{
-	char* ret;
-
-	if (!val) {
-		*dest = NULL;
-		return 0;
-	}
-
-	ret = shm_malloc(val->len + 1);
-	if (!ret) {
-		ERR("No memory left\n");
-		return 1;
-	}
-	memcpy(ret, val->s, val->len);
-	ret[val->len] = '\0';
-	*dest = ret;
-	return 0;
-}
-
-
 /*
  * Make a shared memory copy of ASCII zero terminated string
  * Return value: -1 on error

+ 0 - 8
modules_s/tls/tls_util.h

@@ -60,14 +60,6 @@ do {                         \
 } while(0)
 
 
-/*
- * Make a shared memory copy of str string
- * Return value: -1 on error
- *                0 on success
- */
-int shm_str_dup(char** dest, str* val);
-
-
 /*
  * Make a shared memory copy of ASCII zero terminated string
  * Return value: -1 on error