bionic: remove unneeded variable from chk_realloc()
... and simplify the generated code. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
This commit is contained in:
parent
95604529ec
commit
291100c795
@ -665,8 +665,9 @@ void* chk_realloc(void* mem, size_t bytes)
|
||||
}
|
||||
|
||||
if (new_buffer) {
|
||||
size_t size = (bytes < old_bytes)?(bytes):(old_bytes);
|
||||
memcpy(new_buffer, mem, size);
|
||||
if (bytes > old_bytes)
|
||||
bytes = old_bytes;
|
||||
memcpy(new_buffer, mem, bytes);
|
||||
chk_free(mem);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user