Inproved formatting on struct initializer

This commit is contained in:
2021-04-14 00:12:02 -05:00
parent 4e6f487a0a
commit 61a50fef10

View File

@@ -90,7 +90,10 @@ int trim_map(struct memory_map_t *map, int index)
} }
else else
{ {
struct memory_region_t new_right = {.location = right.location + right.size, .size = (left.location + left.size) - (right.location + right.size), .type = left.type}; struct memory_region_t new_right = {
.location = right.location + right.size,
.size = (left.location + left.size) - (right.location + right.size),
.type = left.type};
left.size = (right.location > left.location) ? right.location - left.location : 0; left.size = (right.location > left.location) ? right.location - left.location : 0;
if(left.size == 0) if(left.size == 0)
remove_map_entry(map, index); remove_map_entry(map, index);