add assert to trace_register

This commit is contained in:
云风
2012-09-17 21:09:00 +08:00
parent fcac8c7f22
commit e8104199de

View File

@@ -87,7 +87,7 @@ trace_register(struct trace_pool *p, int session) {
return;
}
int hash = session % HASH_SIZE;
assert(t->session == 0);
assert(t->session == 0 && session !=0);
t->session = session;
t->prev = NULL;
t->next = p->slot[hash];