From patchwork Mon Apr 20 09:29:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1273233 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::138; helo=mail-lf1-x138.google.com; envelope-from=swupdate+bncbcxploxj6ikrb76w6x2akgqem5ipb3i@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=q8dFvucs; dkim-atps=neutral Received: from mail-lf1-x138.google.com (mail-lf1-x138.google.com [IPv6:2a00:1450:4864:20::138]) (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 495Lxt489Rz9sSd for ; Mon, 20 Apr 2020 19:29:38 +1000 (AEST) Received: by mail-lf1-x138.google.com with SMTP id l5sf4028791lfg.3 for ; Mon, 20 Apr 2020 02:29:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587374975; cv=pass; d=google.com; s=arc-20160816; b=qHuH+7fm6gMN9MPJ+Ai2xnZErsZndEmXjwQZioA9zK0M391qoB9J9TIDwUxFv+GtM6 FTbkdmeM9buELjgf4dXUlL/h8Lbxy2Wu5HMw2tt9QNwlWQFhHl0VPEhs0gQWU+ZUtaSx /vfISX/i9oEdezvNHeEbnwvXfuSZF1XZP4OZll4YzdTX7M4otANKlI2wvcnwXputmJKv U1RxGV39F8YbFSFGh0DYudANwatrfHBRSYxmoE+yqeolM6PgUOfxflJq/qssCOCXIAH9 i+poMpXnBnJuqc7j/S0OlX/qJrQzhDIoVp73W7zTolbHuE+pgwHSYorbU4c4BgXogiRW MwEg== 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=l+HDU6ll11ssJfaFHs076NXMjxSSM6HSXq97fGCrDCQ=; b=LohpB3IF5EAoUUskXtr/z/GqkJt/qgSyn/CJ8sXOSvGzYDPtLdpV5bugYXNb4+UGMK IVjMSrdFLNT3Jt0WDQ2LOhkNcU9Jt2xX7J3YqeVo5d9WVqWBzjtlXrjUgjC3aURF4SYE 8l8Rs1CazUUgnC05bOxrqsP9E+YEc/YXhZDLkj7JZrYPirpvwbmd1UUJBnhR5/Woh5sX +RlDqHHkEyl4dQmPocEzTiuFIB3WqywSx49xZPEu2PjXRf9vP7Zm0qmGE/S/U5omW/Ht SjlvbSQ95wFn/CO7sMcRxIMAyCzdRFiRt+LR8gecHYTsTvHeJG1cB4U2kfeoQJO3H0oX 9VNw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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=l+HDU6ll11ssJfaFHs076NXMjxSSM6HSXq97fGCrDCQ=; b=q8dFvucsX1yM+ptPIIoSzCi7tuN1PZ0/bkmHBT6UrQFo29rMEdIQdQejLDjf6LZ0L4 uG9J97N93dBxoVN/pO8wces8rvXNILoNf2AtdkofrfxHJst+z7xQc6UENNJRk/6bNBFC t/y2pz7rbsln1y3MCcPUUicuBQpiTQynvlOSFqLWbIHhd567jC41CV0m7U7Klw471WpE NA45eGXiD7GOIq021l6qy+twYE+bNp8w1w2eNCeWxLlC+7f3NW7QqC7XF6hNqMxd4P7O zIqGqOGhjUNAjRNZrh9koJ1JRoa5w2S0kfbmoBOupbZdfdXjVQtHbM3hjCeQ07lekqYH sdNw== 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=l+HDU6ll11ssJfaFHs076NXMjxSSM6HSXq97fGCrDCQ=; b=BNis3HtUZPd9P8fwUgGw3ssEk+1qGM35ihhd+ir8AnRHkycKVguJ/j2VD9Syjlibk2 kGF2AscmKsTmytw7zZ6dK3kYB4EgzU2lk9JjiL4aSM9eMQq/oAsPet0h6Oudz9672hbx DBJtnp/zropezRjTnqi4uFdf/zZPHLU06t/6PeLAxTbVjNhAh22u3YH665YvOnBaBetf 4pPV71zUN3C2GleR27jsqrWVlplKUzf1muyYLi9J0eYXv6jr55wh+OqlqtUHw61dWudw SNxGUesc8CG9F2Q9cRket+MnO01rqNJWEFotIw2gIi95XgEBr5TZNLHuYF36qkNgKVlH +2mg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0PuYVO6H9ZD3+iam32PrAJfrO9PwFORmgi/wQtuEZxGCLJ7JTw7p5 d0nctLDGXsW+obWP6gLkV6s= X-Google-Smtp-Source: APiQypKt0x7MN2/6Y3AifNIsn1NW+st31woanJtdK6L1pCLNT1L3jBNoc3kMReDGNlhonRKA1VfdOA== X-Received: by 2002:a2e:888f:: with SMTP id k15mr7305899lji.198.1587374975474; Mon, 20 Apr 2020 02:29:35 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:ac2:551d:: with SMTP id j29ls1474062lfk.1.gmail; Mon, 20 Apr 2020 02:29:34 -0700 (PDT) X-Received: by 2002:ac2:5f73:: with SMTP id c19mr10326437lfc.29.1587374974811; Mon, 20 Apr 2020 02:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587374974; cv=none; d=google.com; s=arc-20160816; b=xrss0zFuyPcmjsmpKIBWYUzXCkDmxGzSbEgPIwpbG92MN3XSzQzdmLDU3uFDlcQnb3 S6gUnR9AsdQHGQYLhbXPP1nguwz4hcBEFDtezj6uf8VEaMDUq/u/t8Ny1FvHr0vtxvWH 9e1DlewmOrYyDxGpm3uM0hVobeeO1HeB2Kg5BW4TpaetpLmZtL0PkR7XDbvQMlAYcy4E jzUQbk20Ykd3UsTKJr+TjVcGnTrTsMAKZjD3qPb3HsidbY9nSRPHqr2pB/wBbeIyjUd5 xvNOFVY55Z1Zbc9K4jQgCG9n7mIc206gyyE6frfn3y/xLxxu4wxM5/8tB6jvljQYRl/O G8Yw== 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=lTCwO4/hqAEr/wM8f6BM9KtIYYy52z5VTM385RNABo4=; b=OSdzkWNtC57EtF0MppeGCnycKZWdxet+CZV7YP5tRUZrcQkC0W5BbrfEM+8L4MVexy ZIRu1/MPncUiFeG5iaenbnt6yzD+Md+JSLMd6e3CZKnOYUPP+rTle5gSZ4hJ4UmORGE3 Gd/jkORJGG5wyW9okrQiE/p2fBm/t2ZAGjOzpZQNCujAaPGZrzw+m6of5M3RYmclAHC/ SjD9bRWUcznM7NwVLgEFlu/IwibxAeHv8M2lWvQtba4i4qUklEQXLOMt8/+dIyDiCPS7 slwnMSKqokZwSV+h705QY5NKWo1BUyglRG7FtwCmMtH7jyPDO8EjxRkedqY83NqqUzKd xJ6Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id x145si26428lff.2.2020.04.20.02.29.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Apr 2020 02:29:34 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 495Lxp2BQcz1rsNJ; Mon, 20 Apr 2020 11:29:34 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 495Lxp1ZHVz1qtwT; Mon, 20 Apr 2020 11:29:34 +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 oC2PMNE5yR5G; Mon, 20 Apr 2020 11:29:33 +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; Mon, 20 Apr 2020 11:29:33 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 5636E454053E; Mon, 20 Apr 2020 11:29:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f7vwx75XvRAQ; Mon, 20 Apr 2020 11:29:31 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id DD8904540577; Mon, 20 Apr 2020 11:29:28 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] Fix coverity #292169 Date: Mon, 20 Apr 2020 11:29:27 +0200 Message-Id: <20200420092927.3582-3-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200420092927.3582-1-sbabic@denx.de> References: <20200420092927.3582-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: 212.18.0.10 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: , Signed-off-by: Stefano Babic --- handlers/swuforward_handler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handlers/swuforward_handler.c b/handlers/swuforward_handler.c index 8719967..a1fdab3 100644 --- a/handlers/swuforward_handler.c +++ b/handlers/swuforward_handler.c @@ -342,6 +342,8 @@ static int install_remote_swu(struct img_type *img, conn->total_bytes = img->size; conn->SWUpdateStatus = IDLE; + LIST_INSERT_HEAD(&priv.conns, conn, next); + /* * Create one FIFO for each connection to be thread safe */ @@ -362,7 +364,6 @@ static int install_remote_swu(struct img_type *img, ret = FAILURE; goto handler_exit; } - LIST_INSERT_HEAD(&priv.conns, conn, next); index++; }