Skip to content
Snippets Groups Projects
Commit d4fad48d authored by lhausamm's avatar lhausamm Committed by Loic Hausammann
Browse files

Add a debugging check

parent 78ee86a7
No related branches found
No related tags found
1 merge request!502Logger
......@@ -48,6 +48,10 @@
*/
void *dump_get(struct dump *d, size_t count, size_t *offset) {
size_t local_offset = atomic_add(&d->count, count);
#ifdef SWIFT_DEBUG_CHECKS
if (d->count > d->size)
error("A new dump file should be created");
#endif
*offset = local_offset + d->file_offset;
return (char *)d->data + local_offset;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment