Skip to content
Snippets Groups Projects
Commit 600734f6 authored by Kostyantyn Vorobyov's avatar Kostyantyn Vorobyov
Browse files

[RTL] Stylistic changes

parent c17830a6
No related branches found
No related tags found
No related merge requests found
...@@ -257,20 +257,20 @@ static void* store_block(void* ptr, size_t size) { ...@@ -257,20 +257,20 @@ static void* store_block(void* ptr, size_t size) {
vabort("Attempt to record NULL block"); vabort("Attempt to record NULL block");
else { else {
char *check = (char*)ptr; char *check = (char*)ptr;
bt_block * block_check = bt_find(ptr); bt_block * exitsing_block = bt_find(ptr);
if (block_check) { if (exitsing_block) {
vabort("\nRecording %a [%lu] at %s:%d failed." vabort("\nRecording %a [%lu] at %s:%d failed."
" Overlapping block %a [%lu] found at %s:%d\n", " Overlapping block %a [%lu] found at %s:%d\n",
ptr, size, cloc.file, cloc.line, base_addr(check), ptr, size, cloc.file, cloc.line, base_addr(check),
block_length(check), block_check->file, block_check->line); block_length(check), exitsing_block->file, exitsing_block->line);
} }
check += size - 1; check += size - 1;
block_check = bt_find(check); exitsing_block = bt_find(check);
if (block_check) { if (exitsing_block) {
vabort("\nRecording %a [%lu] at %d failed." vabort("\nRecording %a [%lu] at %d failed."
" Overlapping block %a [%lu] found at %s:%d\n", " Overlapping block %a [%lu] found at %s:%d\n",
ptr, size, cloc.file, cloc.line, base_addr(check), ptr, size, cloc.file, cloc.line, base_addr(check),
block_length(check), block_check->file, block_check->line); block_length(check), exitsing_block->file, exitsing_block->line);
} }
} }
#endif #endif
...@@ -524,7 +524,7 @@ void delete_block_debug(char *file, int line, void* ptr) { ...@@ -524,7 +524,7 @@ void delete_block_debug(char *file, int line, void* ptr) {
update_cloc(file, line); update_cloc(file, line);
bt_block * tmp = bt_lookup(ptr); bt_block * tmp = bt_lookup(ptr);
if (!tmp) { if (!tmp) {
vabort("Block with base address %a not found in allocation at %s:%d", vabort("Block with base address %a not found in the memory model at %s:%d",
ptr, file, line); ptr, file, line);
} }
delete_block(ptr); delete_block(ptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment