aboutsummaryrefslogtreecommitdiffstats
path: root/wrapper.c
blob: a3301e20202fd15dbf5f866a7d8b237bf2b9c9e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "usage.h"

#include <stdlib.h>

/* Function copyright: git */
int xmkstemp(char *template)
{
	int fd;

	fd = mkstemp(template);
	if (fd < 0)
		die("Unable to create temporary file");
	return fd;
}

void *xmalloc(size_t size)
{
	void *ret = malloc(size);
	if (!ret)
		die("Out of memory");
	return ret;
}