/*** * libccd * --------------------------------- * Copyright (c)2010 Daniel Fiser * * * This file is part of libccd. * * Distributed under the OSI-approved BSD License (the "License"); * see accompanying file BDS-LICENSE for details or see * . * * This software is distributed WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the License for more information. */ #include #include #ifdef HAVE_CONFIG_H #include "config.h" #endif void *ccdRealloc(void *ptr, size_t size) { void *ret = realloc(ptr, size); if (ret == NULL && size != 0){ fprintf(stderr, "Fatal error: Allocation of memory failed!\n"); fflush(stderr); exit(-1); } return ret; }