diff --git a/List/List.c b/List/List.c index abc3175..b4553da 100644 --- a/List/List.c +++ b/List/List.c @@ -133,7 +133,9 @@ void insert_inside_List(THIS(List), void * data, size_t data_size, int index){ old_element->previous->next = new_element; old_element->previous = new_element; - } else OUTSIDE_BOUNDS; + } else { + OUTSIDE_BOUNDS; + } } diff --git a/SharedData/SharedData.c b/SharedData/SharedData.c index 2dc7482..4451fb2 100644 --- a/SharedData/SharedData.c +++ b/SharedData/SharedData.c @@ -9,12 +9,15 @@ SETTER(SharedData, Building *, main_building) int call_elevator_SharedData(THIS(SharedData), int starting_floor, int destination_floor){ /* Make the thread wait for an elevator available and return the id of the elevator available */ - if (this->main_building == NULL) + if (this->main_building == NULL) { CRASH("No building attached to shared data, you cannot call an elevator\n"); - if (starting_floor < 0) + } + if (starting_floor < 0) { CRASH("You cannot start from a floor lower than 0\n"); - if (destination_floor > FLOORS) + } + if (destination_floor > FLOORS) { CRASH("You are trying to reach a floor higher than the highest floor\n"); + } return 0; }