mirror of
https://github.com/tsl0922/ttyd.git
synced 2026-01-01 16:34:23 +01:00
protocol: fix incorrect uv_close usage
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
#ifndef TTYD_UTIL_H
|
||||
#define TTYD_UTIL_H
|
||||
|
||||
#define container_of(ptr, type, member) \
|
||||
({ \
|
||||
const typeof(((type *)0)->member) *__mptr = (ptr); \
|
||||
(type *)((char *)__mptr - offsetof(type, member)); \
|
||||
})
|
||||
|
||||
// malloc with NULL check
|
||||
void *xmalloc(size_t size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user