Message ID | 20200209150709.8252-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBJOAQDZAKGQEMBGKJZQ@googlegroups.com> 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::53a; helo=mail-ed1-x53a.google.com; envelope-from=swupdate+bncbcxploxj6ikrbjoaqdzakgqembgkjzq@googlegroups.com; receiver=<UNKNOWN>) 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=VudJ+lTf; dkim-atps=neutral Received: from mail-ed1-x53a.google.com (mail-ed1-x53a.google.com [IPv6:2a00:1450:4864:20::53a]) (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 48FspJ5XGpz9sPF for <incoming@patchwork.ozlabs.org>; Mon, 10 Feb 2020 02:07:20 +1100 (AEDT) Received: by mail-ed1-x53a.google.com with SMTP id g11sf3875852edu.10 for <incoming@patchwork.ozlabs.org>; Sun, 09 Feb 2020 07:07:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581260837; cv=pass; d=google.com; s=arc-20160816; b=PvwHwMsM8Lmja/cK2i25OlYQk2rMP9Qi1bRDC5aVURQe9xO/j/Ur6oSn6IA4wZES4r h7/7wwD467nrjVekdwlmMCc9L3JTtglX+/7B7qoVHutiRjjVyb7Z7OioYqimDM/AM0pj 1SpP7DIYP6I5FELS30NNJmM58z6YbFRR2aGVe8TQMgslQH4eKG5UNRz6hzpokekg6H0r T73+PAsOs1ydZmzihzMq/51Nxe4YmUTh6ZeA2PV6zsYdlHBeFymSvTjf+St4jeTrE+Aw t6mbDFAn8/Bg1pt4Etx4gB/0IhLce5oL1TkcHsOipTdXb8J2P5sjnOqas8zpwxh+Z+5W 0zHA== 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:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=lFc2ZWim/NcezIy2lLVnn3l0eUD+DPchxTXjRtv/7iY=; b=I/KJ5RpJBGVc7jkthDD1UUjaFIlO3i6S9ezz+oTfii7Xaovn2XHizxEukbnjML/wId pdKsyFw59XeCeBe5ytRvDET38Le0nfRcy4nyEU1d1dAZIN3rhgpvN5rz0KD4kGU/J8I4 g8YPiEJQ6wkfAEnwprKQsCzDdb+VC9s7OujwfLmJdqDt8ED35hoCinM/gNtI75otuQUL uHMpQUmFbJH0gfYeLYAD9Tpp+OukP8VL9gfS8F9p3IPi+G86VEOKZbKf+IV9dcuFWtSX QS7xvM7pjcFBCDwwpuwY8lYABlw7Z1F4lI8E9w/XLWCB9noBcl8s2lWCpPUdvVKCdLvD /HpQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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: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=lFc2ZWim/NcezIy2lLVnn3l0eUD+DPchxTXjRtv/7iY=; b=VudJ+lTfvhqKLZRzNeh0Ljo8N0nz7b8jjYWH3XMZYJKCNpIfcpbs43TjdAENACdSZ9 2+NC4F2vww6Cmg+kUlPtZXCdNlx3FmakFnbKGs3T5grkZX7AZfACMHfRjQmg15/rQ/Se 35AxbZwL+lvn/4oNGndjzVSaW36K5REkfOuATWK+Q0Sj8ISAOSf8S8t2RWNw3HAOX3Xq ZOqlXNAoU8HP3CT4a6ZY+MOAyISTkbgQxd456lpa/cHimkJOuaDG58dtd7kTjxclVDd3 ZSckwa23I/MWCeNH7S2IJWyabyGH30cHjIsCsSOJR69zwVbM3q6hPowxmoFcgHfd/WB5 R1Gw== 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 :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=lFc2ZWim/NcezIy2lLVnn3l0eUD+DPchxTXjRtv/7iY=; b=gWahSIGRcAX5GNcvVq7mQaOZQzJgTTXmf8JKX6avDA/3Zpk80cNom+1YZR6QBs6j7I /1SxTUpN25W4F5o9yATV2/HRS16PHny+3aI2vFLG2V6fDRPSaSer4CD8Ar7cGnIhQCaB KVIDYc0SOKdoCMv50GbMiyl3hn09EfEVu4GMiYizSrUow3pEp9H7iTUqaX/Mp8LQvyb7 liTD86b3a0nQ0oXkyOXLYIdnsc44O306+41AG6hoxbAIb5kKX3q6rdwOAGv0/8URTqcU pMFmQjOwBHC51rPRo+PUT4eox75VOsDnu4mMWFLOEQXv3LopygOX0L997Av0e/ivyH6s eOJg== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAWjqanVaX5FRYUlkTopomwXAV5N58ELUkUT2mTOCys7wLV/BVdX bTVEHlzOGUWeFn1cUbKCtJk= X-Google-Smtp-Source: APXvYqxPJbomHCzDS+TCY4MTqtTTwTPMh5ytzqrH5RHybvqnjkwztz/TPI/obeSh3mnFcAKCNajTGA== X-Received: by 2002:a17:906:f194:: with SMTP id gs20mr5185559ejb.89.1581260837402; Sun, 09 Feb 2020 07:07:17 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:907:385:: with SMTP id ss5ls2511582ejb.7.gmail; Sun, 09 Feb 2020 07:07:16 -0800 (PST) X-Received: by 2002:a17:906:bb04:: with SMTP id jz4mr8022282ejb.183.1581260836558; Sun, 09 Feb 2020 07:07:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581260836; cv=none; d=google.com; s=arc-20160816; b=wZyU4N4SO1REpY2MLfGTPmtvWS6Od1CBRMRMduAubuUEABrS5+ymi/SPi+OJAbfyvV LBWlofYJ7/56AWdEcG2JarFizuP3TBpQCdJ0eoOs9scD0+4TS3c75NxwQeNjIhvC6NOo UgW+axGUcASbC4um1ORNW4DBJPXaok8hJ+gf6Mmv8emsrAjdX9pLYMTdgK3yJC3V2YiF 10Gtl+ylYsEuVjWQfdtc7yrXJC1jOoopbcMr6YIiyyFS7l5KKgVSF1ZAj45JgjYyKFXS EYvRq4mHRAaTlBcs+YXmRdWkYW3gOvBGAaoWyUcOcw5m9z4tXTXQfsb4svXxg585/WTT hI3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=1QlcjsCuh8yFQURUcD/MusiWBqaj1+/pjS5KzjKI0Gs=; b=GlMsscOVwm3ZwmVPqdBXX3vNezVcq1zeAZdYPqAfjcC04QeV4oPhawOYOF9fBsv+yl b0/vbdYMgQFkeeQ1PqR0Ueo7rYxcZv2JYLQbZz3kCoLcHGJiJz57Qfmxs7h+Jf4mCwuH dT7zjVn0z5R78tPTj8SfTDQGD2YwwVnL6gAlFUHs99MhD38jDMQzCI+leQ0jTeNWou2k DEBPHWI2jrBqj0g6A6oyqHiclPxcRfn0eD/Yy8Luah33WMpigGg7kODvFBGnclHrV7BS eoKDu2t/m4kDnCGo713ZNSWHLPA6czZ0T9eVzKFwqnrZtX+m8i3abkySmmdmkqPfkylo nwKg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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.9]) by gmr-mx.google.com with ESMTPS id n1si233924edw.4.2020.02.09.07.07.16 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Feb 2020 07:07:16 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48FspD2LNVz1qqkx; Sun, 9 Feb 2020 16:07:16 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48FspD25qcz1qrmT; Sun, 9 Feb 2020 16:07:16 +0100 (CET) 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 Ms1VPXjUmCV2; Sun, 9 Feb 2020 16:07:14 +0100 (CET) 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; Sun, 9 Feb 2020 16:07:14 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id A6C2A4540486; Sun, 9 Feb 2020 16:07:14 +0100 (CET) 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 Eiswv-JUxWOi; Sun, 9 Feb 2020 16:07:12 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [IPv6:fd00::d0c:b6cf:de15:8699]) by babic.homelinux.org (Postfix) with ESMTP id 23B11454005D; Sun, 9 Feb 2020 16:07:12 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] parser: value for bootloader reused Date: Sun, 9 Feb 2020 16:07:09 +0100 Message-Id: <20200209150709.8252-1-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 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.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
parser: value for bootloader reused
|
expand
|
diff --git a/parser/parser.c b/parser/parser.c index a7c8dc2..8cdbfb4 100644 --- a/parser/parser.c +++ b/parser/parser.c @@ -446,8 +446,6 @@ static int parse_bootloader(parsertype p, void *cfg, struct swupdate_cfg *swcfg, struct img_type *script; struct img_type dummy; - memset(&dummy, 0, sizeof(dummy)); - setting = find_node(p, cfg, "uboot", swcfg); if (setting == NULL) { @@ -463,6 +461,8 @@ static int parse_bootloader(parsertype p, void *cfg, struct swupdate_cfg *swcfg, if (!elem) continue; + memset(&dummy, 0, sizeof(dummy)); + /* * Check for mandatory field */
The last parsed value of a variable is taken even no value is set. Signed-off-by: Stefano Babic <sbabic@denx.de> --- parser/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)