From 3c49cf753f280b578b5f010abd223db4f27b6a0e Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Thu, 13 Jun 2013 17:58:57 +0400 Subject: [PATCH] [REFACTOR] remove sspt_proc_get_new() --- us_manager/helper.c | 4 ++-- us_manager/pf/pf_group.c | 2 +- us_manager/sspt/sspt_proc.c | 11 +---------- us_manager/sspt/sspt_proc.h | 1 - 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/us_manager/helper.c b/us_manager/helper.c index db4bec5..4f9a1fd 100644 --- a/us_manager/helper.c +++ b/us_manager/helper.c @@ -59,7 +59,7 @@ static int ret_handler_pf(struct kretprobe_instance *ri, struct pt_regs *regs) task = check_task(task); if (task) { - proc = sspt_proc_get_new(task); + proc = sspt_proc_create(task); goto install_proc; } @@ -121,7 +121,7 @@ static int ret_handler_cp(struct kretprobe_instance *ri, struct pt_regs *regs) if (check_task(current)) { struct sspt_proc *proc; - proc = sspt_proc_get_new(task); + proc = sspt_proc_create(task); sspt_proc_install(proc); } } diff --git a/us_manager/pf/pf_group.c b/us_manager/pf/pf_group.c index 3b12106..e5b7adb 100644 --- a/us_manager/pf/pf_group.c +++ b/us_manager/pf/pf_group.c @@ -115,7 +115,7 @@ static struct sspt_proc *get_proc_by_pfg_or_new(struct pf_group *pfg, struct pl_struct *pls; /* or find?! */ - proc = sspt_proc_get_new(task); + proc = sspt_proc_create(task); copy_proc_form_img_to_sspt(pfg->i_proc, proc); pls = create_pl_struct(proc); diff --git a/us_manager/sspt/sspt_proc.c b/us_manager/sspt/sspt_proc.c index eb86f10..8ade9dd 100644 --- a/us_manager/sspt/sspt_proc.c +++ b/us_manager/sspt/sspt_proc.c @@ -102,20 +102,11 @@ struct sspt_proc *sspt_proc_get_by_task(struct task_struct *task) return NULL; } -struct sspt_proc *sspt_proc_get_new(struct task_struct *task) -{ - struct sspt_proc *proc; - - proc = sspt_proc_create(task); - - return proc; -} - struct sspt_proc *sspt_proc_get_by_task_or_new(struct task_struct *task) { struct sspt_proc *proc = sspt_proc_get_by_task(task); if (proc == NULL) { - proc = sspt_proc_get_new(task); + proc = sspt_proc_create(task); } return proc; diff --git a/us_manager/sspt/sspt_proc.h b/us_manager/sspt/sspt_proc.h index 34f65e2..51939e8 100644 --- a/us_manager/sspt/sspt_proc.h +++ b/us_manager/sspt/sspt_proc.h @@ -50,7 +50,6 @@ struct sspt_proc *sspt_proc_create(struct task_struct *task); struct sspt_proc *sspt_proc_copy(struct sspt_proc *proc, struct task_struct *task); void sspt_proc_free(struct sspt_proc *proc); -struct sspt_proc *sspt_proc_get_new(struct task_struct *task); struct sspt_proc *sspt_proc_get_by_task(struct task_struct *task); struct sspt_proc *sspt_proc_get_by_task_or_new(struct task_struct *task); void sspt_proc_free_all(void); -- 2.7.4