mirror of https://github.com/ericonr/sndio.git
add/fix more comments
This commit is contained in:
parent
832a0a5a1f
commit
f6df08e0c3
|
@ -139,6 +139,9 @@ panic(void)
|
||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* allocate a (small) abount of memory, and abort if it fails
|
||||||
|
*/
|
||||||
void *
|
void *
|
||||||
xmalloc(size_t size)
|
xmalloc(size_t size)
|
||||||
{
|
{
|
||||||
|
@ -154,12 +157,18 @@ xmalloc(size_t size)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* free memory allocated with xmalloc()
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
xfree(void *p)
|
xfree(void *p)
|
||||||
{
|
{
|
||||||
free(p);
|
free(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xmalloc-style strdup(3)
|
||||||
|
*/
|
||||||
char *
|
char *
|
||||||
xstrdup(char *s)
|
xstrdup(char *s)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue