mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-11-22 22:51:24 +00:00
[common] use variable-relative sizeof where possible
This commit is contained in:
committed by
Geoffrey McRae
parent
982b4e6625
commit
1c5620ba25
@@ -164,7 +164,7 @@ static int dl_iterate_phdr_callback(struct dl_phdr_info * info, size_t size, voi
|
||||
ttl += hdr.p_memsz;
|
||||
}
|
||||
|
||||
crash.ranges = realloc(crash.ranges, sizeof(struct range) * (crash.rangeCount + 1));
|
||||
crash.ranges = realloc(crash.ranges, sizeof(*crash.ranges) * (crash.rangeCount + 1));
|
||||
crash.ranges[crash.rangeCount].start = info->dlpi_addr;
|
||||
crash.ranges[crash.rangeCount].end = info->dlpi_addr + ttl;
|
||||
++crash.rangeCount;
|
||||
|
||||
Reference in New Issue
Block a user