1 |
|
/* |
2 |
|
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
3 |
|
* |
4 |
< |
* Copyright (c) 1997-2014 ircd-hybrid development team |
4 |
> |
* Copyright (c) 1997-2015 ircd-hybrid development team |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
15 |
|
* |
16 |
|
* You should have received a copy of the GNU General Public License |
17 |
|
* along with this program; if not, write to the Free Software |
18 |
< |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
18 |
> |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 |
19 |
|
* USA |
20 |
|
*/ |
21 |
|
|
33 |
|
|
34 |
|
|
35 |
|
/* |
36 |
< |
* MyMalloc - allocate memory, call outofmemory on failure |
36 |
> |
* MyCalloc - allocate memory, call outofmemory on failure |
37 |
|
*/ |
38 |
|
void * |
39 |
< |
MyMalloc(size_t size) |
39 |
> |
MyCalloc(size_t size) |
40 |
|
{ |
41 |
|
void *ret = calloc(1, size); |
42 |
|
|
54 |
|
{ |
55 |
|
void *ret = realloc(x, y); |
56 |
|
|
57 |
< |
if (ret == NULL) |
57 |
> |
if (y && ret == NULL) |
58 |
|
outofmemory(); |
59 |
|
|
60 |
|
return ret; |
63 |
|
void |
64 |
|
MyFree(void *x) |
65 |
|
{ |
66 |
< |
if (x) |
67 |
< |
free(x); |
66 |
> |
free(x); |
67 |
|
} |
68 |
|
|
69 |
|
void * |