Remove unecessary NULL check in kernel/acct.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



copy_process() appears to be the only caller of acct_clear_integrals() and
does not pass in NULL task pointers. Remove the unecessary check.

Signed-off-by: Matt Helsley <[email protected]>

--
 
 kernel/acct.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

Index: linux-2.6.17-rc4-mm1/kernel/acct.c
===================================================================
--- linux-2.6.17-rc4-mm1.orig/kernel/acct.c
+++ linux-2.6.17-rc4-mm1/kernel/acct.c
@@ -597,11 +597,9 @@ void acct_update_integrals(struct task_s
  * acct_clear_integrals - clear the mm integral fields in task_struct
  * @tsk: task_struct whose accounting fields are cleared
  */
 void acct_clear_integrals(struct task_struct *tsk)
 {
-	if (tsk) {
-		tsk->acct_stimexpd = 0;
-		tsk->acct_rss_mem1 = 0;
-		tsk->acct_vm_mem1 = 0;
-	}
+	tsk->acct_stimexpd = 0;
+	tsk->acct_rss_mem1 = 0;
+	tsk->acct_vm_mem1 = 0;
 }


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux