Several improves in error codes.

- Code severity and priority in error codes.
- Added ERROR severity, suitable for function failures.
- Review libisofs errors and its severity.
This commit is contained in:
Vreixo Formoso
2008-01-20 22:28:27 +01:00
parent a076ae9df2
commit 1070fe4cc6
23 changed files with 331 additions and 211 deletions

View File

@@ -84,14 +84,14 @@ int iso_ring_buffer_new(size_t size, IsoRingBuffer **rbuf)
buffer = malloc(sizeof(IsoRingBuffer));
if (buffer == NULL) {
return ISO_MEM_ERROR;
return ISO_OUT_OF_MEM;
}
buffer->cap = (size > 32 ? size : 32) * BLOCK_SIZE;
buffer->buf = malloc(buffer->cap);
if (buffer->buf == NULL) {
free(buffer);
return ISO_MEM_ERROR;
return ISO_OUT_OF_MEM;
}
buffer->size = 0;