remove code as per feedback

This commit is contained in:
auronandace
2026-02-13 13:22:05 +00:00
parent 5d6ae8fd3f
commit 955179ab6f
2 changed files with 0 additions and 3 deletions
-1
View File
@@ -572,7 +572,6 @@ pub unsafe extern "C" fn gethostname(mut name: *mut c_char, mut len: size_t) ->
.map(|()| 0)
.or_minus_one_errno();
if err < 0 {
mem::forget(uts); // forget does nothing with Copy types
return err;
}
for c in unsafe { uts.assume_init() }.nodename.iter() {
-2
View File
@@ -75,14 +75,12 @@ unsafe impl GlobalAlloc for Allocator {
let new =
unsafe { self.alloc(Layout::from_size_align_unchecked(new_size, layout.align())) };
let old_size = layout.size();
let old_align = layout.align();
if !new.is_null() {
let size = cmp::min(old_size, new_size);
unsafe { copy_nonoverlapping(ptr, new, size) };
}
drop((old_size, old_align)); // drop does nothing with Copy types
unsafe { (*self.get()).lock().free(ptr) };
new