From patchwork Sun Sep 22 14:46:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3511 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 179D53F14C for ; Sun, 22 Sep 2024 16:46:30 +0200 (CEST) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5c5b83b6718sf1179405a12.3 for ; Sun, 22 Sep 2024 07:46:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727016389; cv=pass; d=google.com; s=arc-20240605; b=jBOgYkM0MRf41IDfbHwG09KqJ0gPzLV6dBt+8mZm7/HlTJ9J6wsWAQnx9+qJlg2Lc9 0O9ydyADrVQHiWoHqI69/TXkrFXT9Y82fKgPNg+WGTPVhvfisMxcjZ0YcmYlPMyBwyoE RT3ky9GWG5rGuhSdf2K63oNS7xfSY262ddJsgvG1vj9QAry4wYZk4F7yN/+mlynvKFnZ snIa/MDulRzJ02PKiN8T35UyODX+36TJF619ShjFVB1Q8yrM6F6GcVrAlINLj4IMrkkF jcVcS04kGZlev2ke4g1Q7cvdHrluoTBaaG1/D7mUsPDcxFN9VKcDUtm5FiFAzTWvRYRR lJpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; fh=RgqKAXl4peoIO04J+Sehp9efrWN7DxzEsNDS3dB0xms=; b=JMpMLFKUfIlLBCGeoMBvTg00ArCVyPe+x3PPQdEUt5zXYW1u2TMjNrOd3uo3L8vh6g 3Q8awQ0VET+Xw0/x5SUrRNdh+6xmNB3lwB6sX+1m5wjNLEMfFB6TWfMAkdSaVnfCSDrC iytDpB6nBUn5Fo1Kj7hIlB43r/QwZGEB+HWaD7sTjYCTEbTErTlzfzSCUs3pBblk2WSQ aXnOMciqTxEutg7ry11gKwvz+BAn+iryg4sML1cqUegwT8QKzrFcG3LourgrFyAv1gMO tj9wQixf617RqZXLBnXtfKVAE6rEWBzeiBZBGTNFdWxo2itH/wZdFh2aCFx/AblLpc4L qySg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lH7NDaNR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727016389; x=1727621189; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; b=oIJCwuTHrN6lukqbop5bPSkbmqODbjsuNdZu7PrEEy5OzeQTu3z5lNnWM6IaojE2Hh 1Pf0MpcDKaBeyIBpaIHNAgjiirDr3rRvNwsrKzOVa2aGELwClurPsavMRaQlqVLz+s7z 6ui+nDuWD8dmm/nfPElaCAHMSntY1bIxTdUJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727016389; x=1727621189; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; b=xK6W8MZpIRJHtGaYhU1RCWFFXSCfPQZex6Xym6HBAQa7qjLwpIEhM8jk3dGFgzcE7B iJrTAZc2/AzVpEY/dglKk2RE8ge8d+rMzIqYv8cYN5YSpzJGLDx75ao+dgttU+4/2wJM ejwLlUoHIZCj7sp23cGRy+8efzlSEkWJwLVEYZLiOjPYPqmMwKhDWv09dMvMzLHHXy9N NNpzt/is7uJndGais5e3MoqaRNtxG3Q8uUzs4Az3MEFBVUkeL6bkEz+ljGF1YvxqzsRb rWI9ymGNWtIAD95I8V3FL4CkFDcglLaBHZ6jxFhybrUAT0HFoi6z5rlh0gkVj2DUABvK NCdw== X-Forwarded-Encrypted: i=2; AJvYcCW6n9Dbp0B4vmFzKGii5otnckBAqH68n1B58hNd/7oAO3jjK4d/rYrbsRxTZVu13y2e8QSRZG1nBarJS282@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzPbpDtxZtjkrsgBsCo9NFLGJaWhgPckOqK6csuGTZMFLgr7JKo ul/lYZNfCRAsOXv/mRaalT8Lknmv1RC+k0oaF/9l+++e3Scr+wPFMc79QTC8g4YP+Q== X-Google-Smtp-Source: AGHT+IGcTBfZqx8El2Et0w73wnvcNUX8jqgNtTXoAXvhCPOrQueKXK/gzBctXOVnm4mzfDyJUtJvPA== X-Received: by 2002:a17:907:7b92:b0:a8a:9246:7f57 with SMTP id a640c23a62f3a-a90d4fbcd4dmr1112736166b.4.1727016389500; Sun, 22 Sep 2024 07:46:29 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:35cf:b0:5c4:2278:28dd with SMTP id 4fb4d7f45d1cf-5c45995355als1470209a12.2.-pod-prod-06-eu; Sun, 22 Sep 2024 07:46:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVD1R+Bqw7u+GAU3B4KBG00K0tWz7VAJZ6G7g7/xGtSoNKRZIKX8AgLSI1eZiptAXAotTJuUnEyOIWFx0E@amarulasolutions.com X-Received: by 2002:a17:907:f1a6:b0:a86:7fc3:8620 with SMTP id a640c23a62f3a-a90d4ffc1b8mr907024966b.31.1727016387863; Sun, 22 Sep 2024 07:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727016387; cv=none; d=google.com; s=arc-20160816; b=fRWv5uydxDPw9ZcnkGT3ku6d8ekKxPZi0XLSJnyyylw58k8VZI94AyRP5KgneCi824 HEQ89FP1eY3zKe/afvpy/5nZxkFDb/HwalGOFHtNBEhqqhPAeQeSzQB5jVxVomj4yo7r i7/LhPSQ0eqeU/ISM/oAmwitK5FCMOl538G/WSDZIB7XgZAWdWMYHbSBOH7BuK+ifxXj kWAgzSzJ2eb75rYzqFVoALeg56EOdwnZXX4JsmV/K4uehE7K88xM6bnxOLogSDGtfg12 U3m1NYrsau7tIzuRhSFvBI21lnAAFlEQERYCVUmwNJjbjECgAoKqDUvj7XXtx+c/Rux7 BoIw== 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:dkim-signature; bh=YPYlfu2VkH5W38C/INzwLlNXJPhMZKljvgdLTCWrM5w=; fh=sK5J+WaGXNlNSlNpQ/BrZZfawJVi6XPLjciAb9mRiYU=; b=Pw4bm101WkofE8vHZEKrvayvVOliSLjBZlbjf3xqW0DPJe1ZlCVq6vK9Dq59om8aBP XmaSe5eyLWPVXMLw6z1tI7nQe5Fgb8rj2FFpx36PkfgzcrgGZe5lZtYwb17NzYfDzbOS kwtkyglB7x9PXnWRjdpXT9O/yHpMZPzde0aHkZafQrAFGWJtlnPSojukXvkvhvaT2agU xYs83TEiLjVDqMZ3Oc/POhcJqlRfyceW1EmgJTw2v/uC9JrMrhmGLhgKDQBGeC+U+gGi 4v1pc3L9FKD4d2GAN53km2wKeb6es0aJWbxMmrzb7W/BBJKt0KRRoSdVhHu+QuZrnKFb 6TYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lH7NDaNR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a90612b452esor696141066b.15.2024.09.22.07.46.27 for (Google Transport Security); Sun, 22 Sep 2024 07:46:27 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCVSa/6BkEkq3OujoC8ztD68weuGKH/WxGTsggt5bcIxeYsfk7+rNqEYlyZNPahOAlzWgZaaj9jJyrlWe+WQ@amarulasolutions.com X-Received: by 2002:a17:907:3f19:b0:a86:43c0:4270 with SMTP id a640c23a62f3a-a90d4fbc6a1mr1015534366b.13.1727016387277; Sun, 22 Sep 2024 07:46:27 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-102-52.retail.telecomitalia.it. [79.20.102.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9061331694sm1088425766b.210.2024.09.22.07.46.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 07:46:26 -0700 (PDT) From: Dario Binacchi To: netdev@vger.kernel.org Cc: Stephen Hemminger , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [iproute2, RESEND PATCH 1/2] arpd: use designated initializers for msghdr structure Date: Sun, 22 Sep 2024 16:46:12 +0200 Message-ID: <20240922144613.2103760-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lH7NDaNR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch fixes the following error: arpd.c:442:17: error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion] 442 | NULL, 0, raised by Buildroot autobuilder [1]. In the case in question, the analysis of socket.h [2] containing the msghdr structure shows that it has been modified with the addition of padding fields, which cause the compilation error. The use of designated initializers allows the issue to be fixed. struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN int __pad1; #endif int msg_iovlen; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN int __pad1; #endif void *msg_control; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN int __pad2; #endif socklen_t msg_controllen; #if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN int __pad2; #endif int msg_flags; }; [1] http://autobuild.buildroot.org/results/e4cdfa38ae9578992f1c0ff5c4edae3cc0836e3c/ [2] iproute2/host/mips64-buildroot-linux-musl/sysroot/usr/include/sys/socket.h Signed-off-by: Dario Binacchi --- misc/arpd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/arpd.c b/misc/arpd.c index e77ef53928a2..b4935c23eebb 100644 --- a/misc/arpd.c +++ b/misc/arpd.c @@ -437,10 +437,10 @@ static void get_kern_msg(void) struct iovec iov; char buf[8192]; struct msghdr msg = { - (void *)&nladdr, sizeof(nladdr), - &iov, 1, - NULL, 0, - 0 + .msg_name = &nladdr, .msg_namelen = sizeof(nladdr), + .msg_iov = &iov, .msg_iovlen = 1, + .msg_control = (void *)NULL, .msg_controllen = 0, + .msg_flags = 0 }; iov.iov_base = buf; From patchwork Sun Sep 22 14:46:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3512 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D927E40D6A for ; Sun, 22 Sep 2024 16:46:30 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5c421ae1c7asf2068783a12.2 for ; Sun, 22 Sep 2024 07:46:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727016390; cv=pass; d=google.com; s=arc-20240605; b=b2Qv/gW/6aw5qUkM4tfUyrj+/X6w+9sF/QTRIazgETaGznN/iWyXmKXLuiWhATX7X8 phPyqHdy5mGMGN1lOQh7vloUPg5LgS019wnH3Y5gBuYPwMOkPxfgTz8SY5SQgvK/joJT oauw0yf88POupw30yoXZ96BHMcWotfS5gdF0ONg70HyoqlMkdBTSwJJTCQm1tiMHtKb0 kIxgVPMwpa0ElgnqGACoD7Z2oxztEPOEhN53Wak391Tc9v1HRI6Z0dXzEqmHUTgef1Ky 2jSFYj+8ex5NEQGLL4hVEt4NjDhagJXBsBa2KnmL4ZGoK2jlY0E+6Q2bCDUJEvdUbA7f 5AQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=xQXyFiQWrCkLI/+qsSpZh5Cabc80ni4PHIB2Ov5icsA=; fh=FXSeDal64I37QIDnjrv7sklW5TVB7/giuNMxma0pofQ=; b=Y/LhtzzYk4GJmxwjK8VfkKNRt/iNKg1mUWsTTHcjUm2en4H5MhSvv8N/A+qxhFGZ7V pAFxKaNXEhReFbC0o9Npu1wH97Pix6Gymxjxim1uBQKSoRJqP4zsZa6Wko+yVfCd8zW1 Sr71RKnywFELEWNB8cy0vDxeUbRuTpWnMhLywT8HRUIxvKvaihYyQkn+Q3Vmuc3zlfuH RG7XMrj+k86QVEVx1e/1tZpyjRYRz7hh+Wd0LM+uk9MAEyWN0iD4MomghRniU4JAjBMK ppkeVZ76a3F0k3fBcvaQxlYGBP85Xu8YLmZNCU7wEQ2ClgXVpwZV1OmDlUmvEX6B+kBa CkFg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="FQOYdCS/"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727016390; x=1727621190; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=xQXyFiQWrCkLI/+qsSpZh5Cabc80ni4PHIB2Ov5icsA=; b=ntX9d+egV61ATrQJ2DKcWL8ElBSUI6/bdAhYa7c857USTW6XlfkyeiNXfIqIFWgp+a fPgQDQFhkhtrOv9DqmFHXRaMP2JWvQakwFqh+tQgekD0K81qLkh4FzJJy5ynlnfxqNWz g/oYAU2kgFWlJoSht4XFmuh//AyZyjLNFHucA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727016390; x=1727621190; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xQXyFiQWrCkLI/+qsSpZh5Cabc80ni4PHIB2Ov5icsA=; b=ACoC/2O2Fr/p1v0ZF+i/1kHt0h41juEWNUYcJkTB03a6P5N+GDOl1cP7iW8tF7cOUs amaH1f6tE1glWR/KXDH3RvnT7qyqbM4xc6V+0Exw9vu915LXef/npU5oBzq3nSHyvStP ez1w2WwHGDDhr2u2o5H/0/3UuZCkxWztj39+O8GV8Cmj/a6SCF5qulAmq8FSoHpBmgtL 7zsM0AtknsuO9ZpfLGmYyrqsTqaJEkuAenbHqyATe0GZ1whL7oDxR31ilWDxxEDGimY8 dwu5qmC8oNG53z1Cu+H3zc7AM1uQ6KMd3RkKL+tJoqhOYw0DTw4yQpzDeaRrzxmrpGNI qM/g== X-Forwarded-Encrypted: i=2; AJvYcCVGBwH9MY5211+W9kBFBUVQufie2voSJ2jfenjiKxZIHZ1WJ+Mvk5BfC2BVSMbjk9LzjXIPsNr9soOfvJuj@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxrsjTYtiba6pmaTVXEJdycf2LdyKz0ZmH0elqGsYLEMlkJSuVq HUIYPQ9UADBWivj2SJsYnkz4mIBBJnjumSYxzRI1eQnnjBPt2aNFlByiBu2ZH2+tQQ== X-Google-Smtp-Source: AGHT+IEbxj5LeupYAT4im0qhwlBgIq34v6/OQlqbcxBCl5gqwJNlTM6MUdPK9whi++nJ/nSvbUANPA== X-Received: by 2002:a05:6402:5216:b0:5c3:d908:98f0 with SMTP id 4fb4d7f45d1cf-5c464daab65mr7067698a12.3.1727016390405; Sun, 22 Sep 2024 07:46:30 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:210e:b0:5c5:b616:e00 with SMTP id 4fb4d7f45d1cf-5c5b6160e5fls817546a12.2.-pod-prod-09-eu; Sun, 22 Sep 2024 07:46:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV3Y0qGkNFk8INmOFtB9/59h2Hb9o9XaPstHDOKUDlxYJI6VGTZz5fgEgEBLFW6F3zfaMKU0RmaQif7qUvv@amarulasolutions.com X-Received: by 2002:a17:906:cae2:b0:a8d:61ca:271e with SMTP id a640c23a62f3a-a90d549d1cdmr868819866b.6.1727016388761; Sun, 22 Sep 2024 07:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727016388; cv=none; d=google.com; s=arc-20160816; b=FLMZrAx5zRqiX6a2JFNucNNJrK9bSS1z12JFZuAWm7tpmdGiy5hYf7z2SFW04RSjXj wdOYrNBXMhj1nVkoRMkL2r1u1OKMk0Xo4jqWjeMDNmN0VEIuLw1UXVSQ2kyUHDZFopVZ dRlNrCuKPPrZkeSUPx2cRcs/9CW5YzGPJCQFECJhaO8cgf2UsjoH1JKrKb/PxDiBD5z/ 12n2jslz14VWW3vUbvavvuB7BKuL7QyAYTIT0YPROiIK9rQQJ0KnwA12vON4w8lRtF5k pyWjec3UIJTfKFcb9zAyrXuZGhcoOHjLgtoVNKzEAO2H0zzh6UG3/fhkomZa2jZHNKOm MzZg== 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:dkim-signature; bh=jXKyj9QfU6TS4dahNlEkSbG4SpYUyfzDDNO0f4/oKhE=; fh=W3yfYRV1Vm8W1qClCnnfAM2XD146x67doic9t7AnCps=; b=DlqhR32bM88+pVSw11hnztUauOdMdImjSAcWRd9xlN6LKDvpN5YRQ2UJTGjiJVDhXx gmfBFto8Rw6mqX1u7LSnRnkWjtOZi6Z7Z57ZVoMgVzoeh+OHJnytG37QBI5di41ge95g g7oUVYvq34ZXhSzhlBViyS3fck8CgTTclTCEui51BmR0geniPs9VMhLaFy37HMLAy+2d +9aOoHJq6MFwfpF8tZRWTu4X0fXfB17sl5W9E+22qEYidbfh1H9rJJ3DweiDzUBr+4QJ Nn2gyBglSMa4f86Q33606VTbsEiwOs8YN0BQM9KkBuA5BPpkROgVHtc+ferG6oU3wsqr RKmA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="FQOYdCS/"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a90612d8504sor594154666b.13.2024.09.22.07.46.28 for (Google Transport Security); Sun, 22 Sep 2024 07:46:28 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCWi+yaTYfr0G58PGcB1afH6/gs3pY5hOMGnMbiwvALLW+cZ9o8Syjcbe6H038pCm1RYtGao3WiTbUkZ1w6g@amarulasolutions.com X-Received: by 2002:a17:907:d599:b0:a8d:5e1a:8d80 with SMTP id a640c23a62f3a-a90d5779864mr897982566b.40.1727016388245; Sun, 22 Sep 2024 07:46:28 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-102-52.retail.telecomitalia.it. [79.20.102.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9061331694sm1088425766b.210.2024.09.22.07.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 07:46:27 -0700 (PDT) From: Dario Binacchi To: netdev@vger.kernel.org Cc: Stephen Hemminger , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [iproute2, RESEND PATCH 2/2] arpd: drop useless initializers Date: Sun, 22 Sep 2024 16:46:13 +0200 Message-ID: <20240922144613.2103760-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240922144613.2103760-1-dario.binacchi@amarulasolutions.com> References: <20240922144613.2103760-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="FQOYdCS/"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It is useless to initialize the fields of a structure to their default values. This patch keeps the initialization only for those fields that are not set to their default values. Signed-off-by: Dario Binacchi --- misc/arpd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/arpd.c b/misc/arpd.c index b4935c23eebb..a2ae76a41f8d 100644 --- a/misc/arpd.c +++ b/misc/arpd.c @@ -439,8 +439,6 @@ static void get_kern_msg(void) struct msghdr msg = { .msg_name = &nladdr, .msg_namelen = sizeof(nladdr), .msg_iov = &iov, .msg_iovlen = 1, - .msg_control = (void *)NULL, .msg_controllen = 0, - .msg_flags = 0 }; iov.iov_base = buf;