forked from github/server
some trivial assertions
This commit is contained in:
parent
77ed6f3722
commit
1e4b860a2e
|
@ -217,6 +217,7 @@ int resolve_faction(variant id, void *address)
|
|||
result = -1;
|
||||
}
|
||||
}
|
||||
assert(address);
|
||||
*(faction **)address = f;
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ resolve_fun resolver)
|
|||
|
||||
void ur_add(variant data, void *ptrptr, resolve_fun fun)
|
||||
{
|
||||
assert(ptrptr);
|
||||
if (ur_list == NULL) {
|
||||
ur_list = malloc(BLOCKSIZE * sizeof(unresolved));
|
||||
ur_begin = ur_current = ur_list;
|
||||
|
@ -86,6 +87,7 @@ void resolve(void)
|
|||
ur_list = ur;
|
||||
continue;
|
||||
}
|
||||
assert(ur->ptrptr);
|
||||
ur->resolve(ur->data, ur->ptrptr);
|
||||
++ur;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue