Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932284AbWEXXfV (ORCPT ); Wed, 24 May 2006 19:35:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932337AbWEXXfV (ORCPT ); Wed, 24 May 2006 19:35:21 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:51851 "EHLO e5.ny.us.ibm.com") by vger.kernel.org with ESMTP id S932284AbWEXXfV (ORCPT ); Wed, 24 May 2006 19:35:21 -0400 Subject: Remove unecessary NULL check in kernel/acct.c From: Matt Helsley To: Trivial Cc: LKML Content-Type: text/plain Date: Wed, 24 May 2006 16:28:09 -0700 Message-Id: <1148513289.6853.1120.camel@stark> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1147 Lines: 36 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 -- 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/