From patchwork Fri Oct 28 06:16:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maneesh Jain X-Patchwork-Id: 688191 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t4tpC6DTZz9s3s for ; Fri, 28 Oct 2016 17:17:23 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c00TQ-0004Fd-HX; Fri, 28 Oct 2016 06:17:04 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c00TN-0004D1-9M for hostap@lists.infradead.org; Fri, 28 Oct 2016 06:17:02 +0000 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OFQ02FD9URMIXA0@mailout4.samsung.com> for hostap@lists.infradead.org; Fri, 28 Oct 2016 15:16:35 +0900 (KST) X-AuditID: cbfee61b-f793d6d000005a2a-b3-5812ed433b12 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 74.F9.23082.34DE2185; Fri, 28 Oct 2016 15:16:35 +0900 (KST) Received: from localhost.localdomain ([107.109.228.68]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OFQ00CIOURI7A30@mmp2.samsung.com>; Fri, 28 Oct 2016 15:16:35 +0900 (KST) From: Maneesh Jain To: hostap@lists.infradead.org Subject: [PATCH] hs20:Remove redundant Null Check Date: Fri, 28 Oct 2016 11:46:27 +0530 Message-id: <1477635387-29472-1-git-send-email-maneesh.jain@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHLMWRmVeSWpSXmKPExsVy+t9jQV3nt0IRBrun6FisfZRmcfbZPVaL Wzf6WRyYPTYvqffo27KKMYApys0mIzUxJbVIITUvOT8lMy/dVik0xE3XQkkhLzE31VYpQtc3 JEhJoSwxpxTIMzJAAw7OAe7BSvp2CW4Za15+YCr4zlaxehtbA+Nz1i5GDg4JAROJL2vZuhg5 gUwxiQv31gPZXBxCArMYJab/fsMK4fxklPgy6xszSBWbgK7EmmtN7CC2iICcxMmXF5hBBjEL OEtsmewLEhYWMJTom78IbCiLgKrE/OZvLCA2r4CHxIlNm6GWAbUem8w6gZF7ASPDKkaJ1ILk guKk9FyjvNRyveLE3OLSvHS95PzcTYzgsHomvYPx8C73Q4wCHIxKPLwzzgtFCLEmlhVX5h5i lOBgVhLhNXoDFOJNSaysSi3Kjy8qzUktPsRoCnTARGYp0eR8YMjnlcQbmpibmBsbWJhbWpoY KYnzNs5+Fi4kkJ5YkpqdmlqQWgTTx8TBKdXAGKuboGWq7vxb0ZldozP7s+XJtnO8hu2r9/hH /uY8GZW89Uaw3zxtoRVvzrvzCZcxVqvM3cDeVsW449XMs6aT5Vm5FnfZpc5fGaa2b9aShQ92 +ilbNeT1Ttr4r6Xd5c2kEzPyGr6Ff/HXeHdG4Fa2Q9ZnjzNvw71vcns9e+exc9ZN+/oT67bV KLEUZyQaajEXFScCAJrBRslBAgAA X-MTR: 20000000000000000@CPGS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161027_231701_546067_23F7005C X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.34 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [203.254.224.34 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maneesh Jain , sachin.dev@samsung.com MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Maneesh Jain --- hs20/server/spp_server.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hs20/server/spp_server.c b/hs20/server/spp_server.c index 33e3fa1..51c1d96 100644 --- a/hs20/server/spp_server.c +++ b/hs20/server/spp_server.c @@ -1823,10 +1823,8 @@ static xml_node_t * hs20_spp_post_dev_data(struct hs20_svc *ctx, } if (strcasecmp(req_reason, "User input completed") == 0) { - if (devinfo) - db_add_session_devinfo(ctx, session_id, devinfo); - if (devdetail) - db_add_session_devdetail(ctx, session_id, devdetail); + db_add_session_devinfo(ctx, session_id, devinfo); + db_add_session_devdetail(ctx, session_id, devdetail); ret = hs20_user_input_complete(ctx, user, realm, dmacc, session_id); hs20_eventlog_node(ctx, user, realm, session_id,