changing order 95b19f75
Anselm R. Garbe · 2006-10-12 12:59 1 file(s) · +9 −9
util.c +9 −9
18 18
	return res;
19 19
}
20 20
21 -
char *
22 -
estrdup(const char *str) {
23 -
	void *res = strdup(str);
24 -
25 -
	if(!res)
26 -
		eprint("fatal: could not malloc() %u bytes\n", strlen(str));
27 -
	return res;
28 -
}
29 -
30 21
void
31 22
eprint(const char *errstr, ...) {
32 23
	va_list ap;
36 27
	va_end(ap);
37 28
	exit(EXIT_FAILURE);
38 29
}
30 +
31 +
char *
32 +
estrdup(const char *str) {
33 +
	void *res = strdup(str);
34 +
35 +
	if(!res)
36 +
		eprint("fatal: could not malloc() %u bytes\n", strlen(str));
37 +
	return res;
38 +
}