Skip to content

Commit

Permalink
removed old commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
nohajc committed Nov 4, 2022
1 parent c68287e commit a072f35
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions adb-hooks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,6 @@ unsafe extern "C" fn close(fd: c_int) -> c_int {

// type OpenFn = unsafe extern "C" fn(*const c_char, c_int, ...) -> c_int;
// static REAL_OPEN: Lazy<OpenFn> = Lazy::new(|| func!(LIBC, open));
// static REAL_OPEN: Lazy<OpenFn> = Lazy::new(|| unsafe{
// mem::transmute(redhook::ld_preload::dlsym_next("open\0"))
// });

#[no_mangle]
pub unsafe extern "C" fn open(pathname: *const c_char, flags: c_int, mut args: ...) -> c_int {
Expand Down
1 change: 0 additions & 1 deletion dlhook/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ impl<'a> LibHandle<'a> {
#[macro_export]
macro_rules! func {
($lib_handle:ident, $real_fn:ident) => {{
// ::dlhook::named_func($real_fn, concat!(stringify!($real_fn), "\0"))
let nf = ::dlhook::named_func($real_fn, stringify!($real_fn));
let addr = $lib_handle.sym_addr(nf, |sym| {
sym as *const usize == $real_fn as *const usize
Expand Down

0 comments on commit a072f35

Please sign in to comment.