Skip to content
Snippets Groups Projects
Commit 075d56a0 authored by Dan Egnor's avatar Dan Egnor
Browse files

Fixes from Per Cederqvist

parent 1745b9d5
No related branches found
No related tags found
No related merge requests found
......@@ -82,6 +82,7 @@ static oop_source_sys *verify_source(oop_source *source) {
static void sys_on_fd(oop_source *source,int fd,oop_event ev,
oop_call_fd *f,void *v) {
oop_source_sys *sys = verify_source(source);
assert(NULL != f && "callback must be non-NULL");
if (fd >= sys->num_files) {
int i,j,num_files = 1 + fd;
sys_file *files = oop_malloc(num_files * sizeof(sys_file));
......@@ -117,6 +118,7 @@ static void sys_on_time(oop_source *source,struct timeval tv,
oop_source_sys *sys = verify_source(source);
struct sys_time **p = &sys->time_queue;
struct sys_time *time = oop_malloc(sizeof(struct sys_time));
assert(NULL != f && "callback must be non-NULL");
if (NULL == time) return; /* ugh */
time->tv = tv;
time->f = f;
......@@ -185,6 +187,7 @@ static void sys_on_signal(oop_source *source,int sig,
oop_call_signal *f,void *v) {
oop_source_sys *sys = verify_source(source);
struct sys_signal_handler *handler = oop_malloc(sizeof(*handler));
assert(NULL != f && "callback must be non-NULL");
if (NULL == handler) return; /* ugh */
assert(sig > 0 && sig < OOP_NUM_SIGNALS && "invalid signal number");
......
......@@ -115,7 +115,7 @@ static int reg(SOCKET sock,HTEventType type,HTEvent *www_event) {
oop_type = OOP_WRITE;
break;
case HTEvent_INDEX(HTEvent_OOB):
// XXX: we don't handle this; does anything use it?
/* XXX: we don't handle this; does anything use it? */
return HT_ERROR;
default:
assert(0 && "invalid HTEvent type specified");
......@@ -158,7 +158,7 @@ static int unreg(SOCKET sock,HTEventType type) {
oop_type = OOP_WRITE;
break;
case HTEvent_INDEX(HTEvent_OOB):
// XXX: we don't handle this; does anything use it?
/* XXX: we don't handle this; does anything use it? */
return HT_ERROR;
default:
assert(0 && "invalid HTEvent type specified");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment