]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HS 2.0 server: Remove redundant NULL check
authorManeesh Jain <maneesh.jain@samsung.com>
Fri, 28 Oct 2016 06:16:27 +0000 (11:46 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 28 Oct 2016 16:08:32 +0000 (19:08 +0300)
Both devinfo and devdetail are non-NULL here due to the earlier check
within the same function.

Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
hs20/server/spp_server.c

index 33e3fa10385a889cea7cdaf9d55031442d3c5f87..51c1d9638b883a5ef4586bd5e8541f4df32f51ca 100644 (file)
@@ -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,