diff options
| author | manuel <manuel@mausz.at> | 2013-02-04 00:08:53 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2013-02-04 00:08:53 +0100 |
| commit | 69aec538b456402170dc723af417ba5c05389c32 (patch) | |
| tree | e6f34c543f17c6392447ea337b2e2868212424d1 /alloc_re.c | |
| download | qmail-69aec538b456402170dc723af417ba5c05389c32.tar.gz qmail-69aec538b456402170dc723af417ba5c05389c32.tar.bz2 qmail-69aec538b456402170dc723af417ba5c05389c32.zip | |
qmail 1.03 import
Diffstat (limited to 'alloc_re.c')
| -rw-r--r-- | alloc_re.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/alloc_re.c b/alloc_re.c new file mode 100644 index 0000000..feb8b49 --- /dev/null +++ b/alloc_re.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #include "alloc.h" | ||
| 2 | #include "byte.h" | ||
| 3 | |||
| 4 | int alloc_re(x,m,n) | ||
| 5 | char **x; | ||
| 6 | unsigned int m; | ||
| 7 | unsigned int n; | ||
| 8 | { | ||
| 9 | char *y; | ||
| 10 | |||
| 11 | y = alloc(n); | ||
| 12 | if (!y) return 0; | ||
| 13 | byte_copy(y,m,*x); | ||
| 14 | alloc_free(*x); | ||
| 15 | *x = y; | ||
| 16 | return 1; | ||
| 17 | } | ||
