From patchwork Tue May 10 09:17:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 1016 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 23143154214 for ; Tue, 10 May 2011 11:17:46 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@narfation.org; dkim-adsp=pass Received: from sven-desktop.home.narfation.org (bathseba.informatik.tu-chemnitz.de [134.109.192.185]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id D0376940DC; Tue, 10 May 2011 11:18:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1305019080; bh=cvsD7psdWVGSBG6vAe0YNsSsY3vq93htG6M//DRtJqM=; h=From:To:Cc:Subject:Date:Message-Id; b=krQK+6FEygXyIhAAGYXRNmxNR2cv6cgY10kIYhernFSIQXJ5WjBbVeX0toPhTrKKD VNsPFFaESk2MF/uYSuqSqMAHON0+zeoG/iA54oXSTQX/KBdNN/qIlfY7pv8rw28s/5 ejrwrEHs240dsaN0C24o5di78qzG3kF4rSVViBLQ= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 10 May 2011 11:17:40 +0200 Message-Id: <1305019060-26731-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.5.1 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Use kzalloc rather than kmalloc followed by memset with 0 X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2011 09:17:46 -0000 Signed-off-by: Sven Eckelmann --- gateway_client.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/gateway_client.c b/gateway_client.c index 65f3953..e638841 100644 --- a/gateway_client.c +++ b/gateway_client.c @@ -281,11 +281,10 @@ static void gw_node_add(struct bat_priv *bat_priv, struct gw_node *gw_node; int down, up; - gw_node = kmalloc(sizeof(struct gw_node), GFP_ATOMIC); + gw_node = kzalloc(sizeof(struct gw_node), GFP_ATOMIC); if (!gw_node) return; - memset(gw_node, 0, sizeof(struct gw_node)); INIT_HLIST_NODE(&gw_node->list); gw_node->orig_node = orig_node; atomic_set(&gw_node->refcount, 1);