File: alloc_re.c

package info (click to toggle)
ucspi-tcp 0.80-3
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 948 kB
  • ctags: 485
  • sloc: ansic: 3,880; makefile: 576; sh: 305
file content (17 lines) | stat: -rw-r--r-- 214 bytes parent folder | download | duplicates (73)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "alloc.h"
#include "byte.h"

int alloc_re(x,m,n)
char **x;
unsigned int m;
unsigned int n;
{
  char *y;
 
  y = alloc(n);
  if (!y) return 0;
  byte_copy(y,m,*x);
  alloc_free(*x);
  *x = y;
  return 1;
}