mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Remove unecessary NULL check in kernel/acct.c
@ 2006-05-24 23:28 Matt Helsley
  0 siblings, 0 replies; only message in thread
From: Matt Helsley @ 2006-05-24 23:28 UTC (permalink / raw)
  To: Trivial; +Cc: LKML

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 <matthltc@us.ibm.com>

--
 
 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;
 }



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-24 23:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-24 23:28 Remove unecessary NULL check in kernel/acct.c Matt Helsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome