rearranged several stuff
This commit is contained in:
parent
7817523a68
commit
5077207088
6 changed files with 222 additions and 272 deletions
18
util.c
18
util.c
|
@ -29,16 +29,6 @@ emalloc(unsigned int size)
|
|||
return res;
|
||||
}
|
||||
|
||||
void *
|
||||
emallocz(unsigned int size)
|
||||
{
|
||||
void *res = calloc(1, size);
|
||||
|
||||
if(!res)
|
||||
bad_malloc(size);
|
||||
return res;
|
||||
}
|
||||
|
||||
void
|
||||
eprint(const char *errstr, ...)
|
||||
{
|
||||
|
@ -58,11 +48,3 @@ estrdup(const char *str)
|
|||
bad_malloc(strlen(str));
|
||||
return res;
|
||||
}
|
||||
|
||||
void
|
||||
swap(void **p1, void **p2)
|
||||
{
|
||||
void *tmp = *p1;
|
||||
*p1 = *p2;
|
||||
*p2 = tmp;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue