From 61a50fef10c405664c41e3f3e79443f3044b4509 Mon Sep 17 00:00:00 2001 From: ngiddings Date: Wed, 14 Apr 2021 00:12:02 -0500 Subject: [PATCH] Inproved formatting on struct initializer --- src/memorymap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/memorymap.c b/src/memorymap.c index e484360..2adef20 100644 --- a/src/memorymap.c +++ b/src/memorymap.c @@ -90,7 +90,10 @@ int trim_map(struct memory_map_t *map, int index) } 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; if(left.size == 0) remove_map_entry(map, index);