replaced clone_bytes() by clalloc()

This commit is contained in:
Andreas Steffen
2009-05-14 13:55:56 +02:00
parent 910221c236
commit 111b963931
2 changed files with 1 additions and 11 deletions
-8
View File
@@ -38,14 +38,6 @@ all_zero(const unsigned char *m, size_t len)
return TRUE;
}
void *clone_bytes(const void *orig, size_t size)
{
void *p = malloc(size);
memcpy(p, orig, size);
return p;
}
/* Note that there may be as many as six IDs that are temporary at
* one time before unsharing the two ends of a connection. So we need
* at least six temporary buffers for DER_ASN1_DN IDs.
+1 -3
View File
@@ -42,9 +42,7 @@ typedef unsigned long so_serial_t;
/* memory allocation */
extern void *clone_bytes(const void *orig, size_t size);
#define clone_thing(orig) clone_bytes((const void *)&(orig), sizeof(orig))
#define clone_thing(orig) clalloc((void *)&(orig), sizeof(orig))
#define clone_str(str) \
((str) == NULL? NULL : strdup(str))