From patchwork Thu Apr 16 19:13:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1271869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13c; helo=mail-lf1-x13c.google.com; envelope-from=swupdate+bncbcxploxj6ikrbag54l2akgqeael3qtq@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=F08+7Ko0; dkim-atps=neutral Received: from mail-lf1-x13c.google.com (mail-lf1-x13c.google.com [IPv6:2a00:1450:4864:20::13c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49386D5F9Fz9sSb for ; Fri, 17 Apr 2020 05:14:12 +1000 (AEST) Received: by mail-lf1-x13c.google.com with SMTP id y71sf2531687lff.4 for ; Thu, 16 Apr 2020 12:14:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587064448; cv=pass; d=google.com; s=arc-20160816; b=tGQaTMvR3NZcBclMPz77kc3/7gF1/wWb6qZ8ythCsmwWgnxkZCJwW041Ki8rW7X/vl DjfuSVdaxxkB1aXBW8i7deyjQPJBALM3R35ya+UR1XFf3cyrJyujQZX4LTRLs1RDZhJR JIf/FgiLSYKIecBQjfANE5xoE1y4/udBHdpTJR9GWs02mc61t4JxQijd2O8rrP5zLdOS 8Y9D7UHfKgFBGNlRH2WayX4wPGwuIiOH8c9CNnj0x47MbPyh+/Ar0s3pIO5oz5f9wFih g63czEZflXrDD5TvaMutIOWttHTezaOzoRRgMbjaBQdqG4Rgztg9KXbx+ysQYcldswE6 SN3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=wg+3SEbiMgLEdtMTa/beRSRM5YYonNt8yNW4nkHyFss=; b=X9Qeh3zdmt+5dQonR15f0EhosabzPche9Yt8tZkMBNta7qIRSMpnzrRkY9XZDwsM0S jfOpncDS+aLaOq6/nfNHWfkift4IJuYIzo4NwQ9zsMO39YmhPGvQ4CStRH/atI0ec8FZ mC7iIouIhcLQizyG9KiwMcvogUlKHAFi2h5ozZ3ughnAlp5ePPyBolZ3U/pWwZKkxHCt 1QJxGHCmhJmLnYxC/2ZgR1L1uxjzcDMH1RLnWBbua25tA8vkjP0FaOQ7lymInqkFQPOc JYthprc6qpzHBm777rz9npnPJt3waPsUUFFut0s+tR+mgx+iAobfwQA4ExNu6ZxqcSg5 kv9w== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=wg+3SEbiMgLEdtMTa/beRSRM5YYonNt8yNW4nkHyFss=; b=F08+7Ko0CSwDd/FHoukW0OK+UGG3aFGo5EvhwKlKKWrtQ1g14fMC4DyGu4Dh88dFQW OUAWxLF/VhAj1dELVrAj6bb38UHiFity1I8l+z7vI7wXXM3TzD6Ufr60TkASuF6Y8yZ/ soJ0gGIXG9DFKQDeQ4T/P72/Nz/48Dd8ElwPNR6Y2xzyYB9s4hxFPqvK2XsqInQu2oAr uvDPreFSEuCaPRIOMX8CvgI7CdqkG+Bm5ImC85eGRtyMMXw4rCrzRmDYRM6bwPpCJTRJ derfGPL0zUamFTQgJ4FhGlsEjzjhwUXCEQeIT+5aquyT/MI0jxXybPaQUP52nqydni6C LCIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=wg+3SEbiMgLEdtMTa/beRSRM5YYonNt8yNW4nkHyFss=; b=koH/wp9FP/ecOLpmDsOQDV1+EwFnop5FxyeFU5ze7km1O+K05N3jFcoW8LnBoBBzKx AmiqZKoGAQhNmxDcQNwqPCnJx04Neo8Wo1vvfXOOD0T7Gl9tlE/9ChENVU3O1VkmN2Rc ruLaQAyTDVqrjALQNV8TamE/6/UXPyUCt0QZrH1fGCauZMWEzE3DvydSUyVgcGM798B9 L7IOyGXhRdxyiZvYtL8THCAyKMAmmIiqrlL5HCRSL5ekvpk/vENtKx+U2xyiCFhDYtP7 RS/lqWXSCMmyGt9RUkpHoVg//sSewnQ9hkOzKR0i9LwyPCAb0b6hPbdH7GcxKMaQ0rhd qyqw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0PuZU5U22NsdnXNgvxTYSpWu+65omwh3rqVHV3xOhr6k3sSPOQspk 0cWBvSNjpQH7+zIs9HPzYNA= X-Google-Smtp-Source: APiQypJNZt6Hp3yi88ZnR/N4VOv/kqgI+5XO3u8colF/kk35+mzsqgdhtqBYRmJRnRi2AITO2IDMuQ== X-Received: by 2002:a2e:8316:: with SMTP id a22mr6955923ljh.48.1587064448800; Thu, 16 Apr 2020 12:14:08 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:8086:: with SMTP id i6ls2385818ljg.8.gmail; Thu, 16 Apr 2020 12:14:08 -0700 (PDT) X-Received: by 2002:a2e:8112:: with SMTP id d18mr7270147ljg.239.1587064448002; Thu, 16 Apr 2020 12:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587064447; cv=none; d=google.com; s=arc-20160816; b=oRsc//bY1oZI0f8d7UkTaftws+a6WeFrM25YgMVDxzIHXksH4goVSm3jpAvC8Os1is G1EiRM8HBupZ7AqsOoTvhCPKF9XOquH9RMrE6Q6LMSr33s5niFClwQTFm4u2jW/i+C37 tPP3HmmqZoAxScY08rES4R3938kDOkpUioQjP9EvU1/hlJ/ifdriEHT2PLq1XTkJdx1Q CUnnFhtWbt2YAOIYNSS3s4rwz0afLmzCVUMfYGsYu3YtXuyJB55cKsAZlWn4hRXF64cN iadxRzEAMqcuHfeKzlXCFo8xjLDvyHSXN/GSXQAQTm2OAv05iBvz/jbAFoofZ7aW9df5 6mfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=jSo1B2j3mwLRoNeL8KWAPe5vZWCdkHaThgi+iCoiH9c=; b=rTUf8fccKPiqv3HIlWziTt2HPVYSpyVDHV5Js3aZB419WF4MNBnmgFvfkYCxgQ6I9M L0FbqLtJs+nzMWZwir+yfSPM+zkW309Q1EnJ6OKwsXboxk9veBo32ajFE+fV7Q34TEtk mBVMsCOwuaZ69HtfsbD+69MtabTc8znekszGXm4yqaA37SSdOgaaNFCymvK99pZU0rd9 Bw802KS700W8B3bgvd3I7AT2tnERepTyrtHpqGuaW8Mpveft/QWC4bDxYUNWUklyurt+ Y7NgUZ9eXf5Wkvkt2hHVkkPvLQpRcQgQP1g8RWD2hUGKqZWoEKXazERnWnPOkONKUoFN 36Dg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id a12si304469ljm.2.2020.04.16.12.14.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2020 12:14:07 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4938672TXYz1rrkY; Thu, 16 Apr 2020 21:14:07 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49386728mDz1qqkp; Thu, 16 Apr 2020 21:14:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 1rUcJ0pU2Mvj; Thu, 16 Apr 2020 21:14:06 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Thu, 16 Apr 2020 21:14:06 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 4E254454053E; Thu, 16 Apr 2020 21:14:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Rdegd0EH394u; Thu, 16 Apr 2020 21:14:03 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id F345B45405A4; Thu, 16 Apr 2020 21:14:02 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] swuforward: replace LIST_FOREACH with LIST_FOREACH_SAFE Date: Thu, 16 Apr 2020 21:13:59 +0200 Message-Id: <20200416191401.10717-2-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200416191401.10717-1-sbabic@denx.de> References: <20200416191401.10717-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Fix coverity #292169 Signed-off-by: Stefano Babic --- handlers/swuforward_handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/swuforward_handler.c b/handlers/swuforward_handler.c index 2febdd0..8719967 100644 --- a/handlers/swuforward_handler.c +++ b/handlers/swuforward_handler.c @@ -282,7 +282,7 @@ static int install_remote_swu(struct img_type *img, void __attribute__ ((__unused__)) *data) { struct hnd_priv priv; - struct curlconn *conn; + struct curlconn *conn, *tmp; int ret; struct dict_list_elem *url; struct dict_list *urls; @@ -400,7 +400,7 @@ static int install_remote_swu(struct img_type *img, } handler_exit: - LIST_FOREACH(conn, &priv.conns, next) { + LIST_FOREACH_SAFE(conn, &priv.conns, next, tmp) { index = 0; LIST_REMOVE(conn, next); swuforward_ws_free(conn);