aboutsummaryrefslogtreecommitdiff
path: root/src/error.c
blob: e8303dcba3d02ff0c92e397b8fc4db0ff9ee11f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "espik_error.h"

#include <stdio.h>              /* fprintf */
#include <stdlib.h>             /* exit */

void chk_malloc (void *ptr)
{
    if (ptr == NULL)
    {
        fprintf (stderr, "Malloc failed\n");
        fprintf (stderr, "exiting ...\n");
        exit (128);
    }
}