diff options
| author | Timo Savinen <tjsa@iki.fi> | 2005-09-22 15:39:00 +0000 |
|---|---|---|
| committer | Hadrien Dorio <hadrien.dorio@gmail.com> | 2017-12-16 00:23:56 +0100 |
| commit | 35d0e8a808dd1382d5236d1f6f8bfe62b2ebefee (patch) | |
| tree | e84242391375fab6b6e15963b4b1e0be5296b0bd /src/xmalloc.c | |
| download | binary-block-editor-35d0e8a808dd1382d5236d1f6f8bfe62b2ebefee.tar.gz binary-block-editor-35d0e8a808dd1382d5236d1f6f8bfe62b2ebefee.zip | |
0.1.0
Diffstat (limited to 'src/xmalloc.c')
| -rw-r--r-- | src/xmalloc.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/xmalloc.c b/src/xmalloc.c new file mode 100644 index 0000000..01e1173 --- /dev/null +++ b/src/xmalloc.c @@ -0,0 +1,35 @@ +/* + * bbe - Binary block editor + * + * Copyright (C) 2005 Timo Savinen + * This file is part of bbe. + * + * bbe is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * bbe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with bbe; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* $Id: xmalloc.c,v 1.2 2005/09/04 15:58:29 timo Exp $ */ + +#include "bbe.h" +#include <stdlib.h> + +void * +xmalloc (size_t size) +{ + register void *value = malloc(size); + if (value == 0) panic("Out of memory",NULL,NULL); + return value; +} + |

