FSM is a dreadful unreadable thing, reimplement using gotos

This commit is contained in:
Vitaliy Filippov
2019-11-12 18:16:41 +03:00
parent 34451b6e44
commit 4afa95b0e3
4 changed files with 150 additions and 126 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ int blockstore::dequeue_write(blockstore_operation *op)
{
// Big (redirect) write
uint64_t loc = allocator_find_free(data_alloc);
if (loc == (uint64_t)-1)
if (loc == UINT64_MAX)
{
// no space
op->retval = -ENOSPC;