T153: avoid code duplication when setting slot allocator
authorReto Achermann <reto.achermann@inf.ethz.ch>
Fri, 14 Aug 2015 06:30:44 +0000 (08:30 +0200)
committerReto Achermann <reto.achermann@inf.ethz.ch>
Fri, 14 Aug 2015 06:30:44 +0000 (08:30 +0200)
Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

lib/barrelfish/vspace/mmu_aware.c

index 87ddf99..7fd76fc 100644 (file)
@@ -58,11 +58,7 @@ errval_t vspace_mmu_aware_init_aligned(struct vspace_mmu_aware *state,
     state->consumed = 0;
     state->alignment = alignment;
 
-    if (slot_allocator) {
-        state->slot_alloc = slot_allocator;
-    } else {
-        state->slot_alloc = get_default_slot_allocator();
-    }
+    vspace_mmu_aware_set_slot_alloc(state, slot_allocator);
 
     errval_t err;