ucspi-ssl  0.99e
TLS encryption for IPv6 communication
alloc_re.c
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #include "alloc.h"
4 #include "byte.h"
5 
6 int alloc_re(char **x,unsigned int m,unsigned int n)
7 {
8  char *y;
9 
10  y = alloc(n);
11  if (!y) return 0;
12  byte_copy(y,m,*x);
13  alloc_free(*x);
14  *x = y;
15  return 1;
16 }
char * alloc(unsigned int n)
Definition: alloc.c:15
void byte_copy(void *, unsigned int, const void *)
int alloc_re(char **x, unsigned int m, unsigned int n)
Definition: alloc_re.c:6
void alloc_free(char *x)
Definition: alloc.c:25