From patchwork Sun Sep 22 14:44:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3509 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2EDE23F14C for ; Sun, 22 Sep 2024 16:44:29 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c3c245a8easf2230528a12.1 for ; Sun, 22 Sep 2024 07:44:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727016269; cv=pass; d=google.com; s=arc-20240605; b=SFrgu3jbGqgeNjnfKR/6gv8hquaa/5kn3HF27rh+vS4eNnZEGzl6Z+xqdO9a03BMEq TGLOJS9A1/fKO6SToO8xb/j0yq+EZcekohRJWO2m6YF+nqBexbQ3JcK4vDjclKApUxLP h3jEEAdmO6izs5pbwhX0cZH8ymUC8HLpS6iMaSQuc9uHEY4/A6UV8Qs0OGG+kBPUZiTt 9EXgojZAlBX33M0+QjPoQoSuL6VeJyVxkHNanKJMAK55vJmf9qmk6h3zb29+HlwhytcC WjtdztFxEEKkyUFK7hCyJBzEiT9pHAYMAMBEU5M2ciaK0v1WDD4+2vUpV02GRa6y+YhA PveQ== 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:to :from:dkim-signature; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; fh=q+9RsmTXlwq3kbWFU0+PHiylM/jnK/D+zbngjR2TBoI=; b=Glx+F6oBdcTBGbZsi6yoe+OD4iW2iY47h3Zz3SK9W1R8G9ZaYxxSYIir2WuA9xq4IS kZ6NNVXDtDXoU6NBXa1Ybz5Ha7+ZAG5F4aKpqVXXk3aGuGQsdnHZkM5oA1pKlI8OxSD0 1ZTqy+7y0ts67jcvtbxCtjtPPRrIAUV7o0MDaO4Z+p9JQUODzcqgCzq1/vu8fKZdqaac WZG+IJafnAktwrVxUt94pqhRnmomIs1GNWlqioS8741OAdSqiYlKmMzxQ9kTMEsIEc49 9o4ylItDiK8t2ymRHTmyPANh/F+8WO0kYgGm0Kg9PXitWBw6DE5lCknUURQffI9BKehj yRvA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=onbabBk1; 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=1727016269; x=1727621069; 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:to:from:from :to:cc:subject:date:message-id:reply-to; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; b=b9trGJ+7VOyLvFveztMLARZmzTG/8YPNyEZT4Hjmqpv6pNjPP/FVKYBqk67EPLEEV7 +TE+UHzZpGOgoFUjW1J8If1NOegDG2JpBKroVPyCd2Hr6EE3i8oSjX37lt8hisQUFNVd VJYm/3GB9tLrIp0Lrn77CdS7TsxskZ42fllm4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727016269; x=1727621069; 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:to:from:x-beenthere:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IudnYLR1+THYSv6O6dazZXwvdidLzEb8rgM/GGGsGsI=; b=hKV8onW4JaE87j7VorjN7DgToUiS/V4oUz4swKClp7MrpjWSIa3z/PSj7GluilEy8B X1g2KS8YLaGpld8fS8A//TiW2BQy/s0GSkT2ljbQl9zFObQFuUW7gJHL5gQjtR++rAvC nEw9pd+QlntomGLp1aI6fSZ2D/M2rvrn+Heiw89h11sQK67fGIXiWMawDOG6OGnkpZve X3p1pjCqbDE92haTf0UYATh81etZmhYGG0C0hvnD7YVJZ0tB/FenFDgt2O7tXlHbGSco QdWgCvIpMOce+9H2aWRiY9YHUWBbzXmZtXOwlbAdYDKhTz95EiYXeXO4nGLFR61xY6Cs 6/4g== X-Forwarded-Encrypted: i=2; AJvYcCWihzrr4R/Pegr06LcDLFrbf56cv4fBE8cqkNJcwmjmNdydSMYjPob0tniihkeS48T+ydB2KtpD3lIstzx2@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yyvny2EcGgjimgvVJg1qb4ptE+wQ5Bv1pjZkyZGzZUEsmXmpB8K Qc2aT2BnUyIoFHp6iC3LzKDYsZxK5aifsWC9fHVdaXY9xHiBGfnLWA9HiMHWaUy7Ww== X-Google-Smtp-Source: AGHT+IE8teWeufoDAxjgkzUsJFyIUoFJImRr6U2345501gzLO9vkhN9WU8yRQ8Q3NQrhDM4aWgfEKw== X-Received: by 2002:a05:6402:278f:b0:5c2:768d:23e with SMTP id 4fb4d7f45d1cf-5c464df330fmr8906882a12.27.1727016268529; Sun, 22 Sep 2024 07:44:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:234d:b0:5bf:bf:efe4 with SMTP id 4fb4d7f45d1cf-5c45994f1bfls1493811a12.2.-pod-prod-08-eu; Sun, 22 Sep 2024 07:44:27 -0700 (PDT) X-Received: by 2002:a17:907:3f99:b0:a8d:1655:a423 with SMTP id a640c23a62f3a-a90d58c1046mr1144865566b.56.1727016266831; Sun, 22 Sep 2024 07:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727016266; cv=none; d=google.com; s=arc-20160816; b=J3iYN3jj+a4OOOEV3eyAAydDS658NNhtP+PQd2D9hOucKgviBKabJ/ukjeSv2/pEFX i494MD7Ynb6PcbjS/2SrfEucOxOo6nNHjHpCz+4MlyAATg+ch1TCL7FSOHAbrCrPpSGU 2dqSM2BZ5j4/x5cUYiGrJSdoWDooXEVEuWmaBNeJbGzIxGaZddltMUsSheRfxYqIrfDF nY4P1TOaXEEBwHkOzYRtrdW19gPSxYwHz7aIeUlc0Ao/VzMkCQ4hLfqhGyQbAUuwpS0M qsk92naAseCNwaSzMQIU20bEmdl2lwSfvk+ajNSosC2uFVwUCjxQXA4KxZ9aggxGe0L8 zjYg== 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:to :from:dkim-signature; bh=YPYlfu2VkH5W38C/INzwLlNXJPhMZKljvgdLTCWrM5w=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=KEHlN/i6e6NhZ0ihR/Q4DH/q+ZlgPupdFQaYWVqNbyqSPxdKXXcXXhcGabYBz4472M TDbRL82FJweEWBiCTYNOPNU/ibYBWW3IqYWUWW+4c86ozIc/BQy9fFQj2hkpev1aRmeb 4IRL/D87dT7vM8C66TNusoHR6MTIuzDASLAF0hEL3wNXsf2lnVf/4Vlt/yXCOOFei6Ps l4c6Ct0NHjlJ95d8UOtu6qbcSiryw6rcptFMEEZ8f5G6R95c/oOGlwp1pQzgou0TLkst TRajg220DAfdh5QSihAEzj1VerR/kxkux0b6aqfFjCN0zrqXQlXMdLn8y7n8WNLVdTMM pYzw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=onbabBk1; 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-a90610f56c0sor733907466b.5.2024.09.22.07.44.26 for (Google Transport Security); Sun, 22 Sep 2024 07:44:26 -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-Received: by 2002:a17:907:6e8b:b0:a86:a866:9e26 with SMTP id a640c23a62f3a-a90d55de60fmr1159835966b.3.1727016266046; Sun, 22 Sep 2024 07:44:26 -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-a90610968dbsm1090416566b.43.2024.09.22.07.44.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 07:44:25 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [iproute2, RESEND PATCH 1/2] arpd: use designated initializers for msghdr structure Date: Sun, 22 Sep 2024 16:44:23 +0200 Message-ID: <20240922144424.2103551-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=onbabBk1; 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:44:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3510 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 50B9140D6A for ; Sun, 22 Sep 2024 16:44:29 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c24e546f3fsf1908142a12.1 for ; Sun, 22 Sep 2024 07:44:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727016269; cv=pass; d=google.com; s=arc-20240605; b=Z85M3VvHF8l3MMifaRuMC/nm4oM1kdRKmVI4NllJznMWjauj5vK1+uv+P323cZQvkt ubHrZ+K9iWCbJiy5LnjfOqCIHQrFQ38eHAEpa4QjMyt5DCgFlYOd9eOvnYO0RHFnjEO+ o4Zc2WWhna2eAmRbnKXV9HejZtvy3oB7CnMmmZGyTAkKl4hm5rCve7Btsb1hQXxZ6f9y MDaOVGMCCt1IjA87FvieIrJrJx0ZQc/9oBfLPNrCubzL6eUIv9t1qMyWAMk1WId/+q+d 6d0ZffIpIIl1NQhHvogQqSW6WpxItA6pea7R6D47cv1ziIELTi/e/fBxXIQ+AsS9Te5X MJNQ== 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:to:from:dkim-signature; bh=xQXyFiQWrCkLI/+qsSpZh5Cabc80ni4PHIB2Ov5icsA=; fh=5+UIpoKpsLl5yVeTXXQm+JpJcpO7cCnVAy7onT4EPg0=; b=EPfCjeSaWDHzByKPjFj7PqUlplxCzYihE2OhGZj1HNM0OFapid3hEEfGxVoUMynuwK xrzBy1Q4y0H6NZLHGuHPyDjyoFVYurreoWrVDYhUCUTEGYDn7WJ32MEoPw0/dgaAvtlh HYD4K74d1tOmrfsAu3cIJw+900YlGWFA/wRACiGRu+qY9LkA1sS4fyg5WZo4j4gHwSIo X/0S4IYdnihWsCeEBaqbm3a7OpzytI7LzZSdkQfXrXQ0+v8BOX0tqx1Yhr7TkAfqeEqT D4Pt2HsPFXPX5afvH4n3kXd+tpuLGjFV58u2QAwUAA3k8fdYvh6d7TjhuvRscoimwYKI jL+g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=giXI1RAr; 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=1727016269; x=1727621069; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=xQXyFiQWrCkLI/+qsSpZh5Cabc80ni4PHIB2Ov5icsA=; b=n0VxxzbG727D8Ipkw32RA4h/G61AyGoQzoBMTYLJIanbD7GbO7+FHcqhYonS81jkTp Au8IlI13DRwGd9b8I8LAVR5cgWbxJgVY0fQtlud2gmWyp4jypj9EyIHVyF5FQ10ZoUxy W2Zn1xecobUhQoDgKZIuVHoC+orJYkkshpVbM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727016269; x=1727621069; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xQXyFiQWrCkLI/+qsSpZh5Cabc80ni4PHIB2Ov5icsA=; b=AI5BmA10+dWL9f5QsZQWdLib1h8yML3dKDShkOaH+jJKHhqRhmYuHBjFsGyLPdVzPU 6W2i9oLyefRqA1daM+oNrDDn5+uo/RUjyZb0huvR2jwSFU2KUgRGRvrgBxeyUh6t7XoB 6IdE2Zr7CKhAUSclsUS6QQXDODERsi+T45ECYLIBjd3qAF1K0UT0KdkZ8JRIBuldN3cM 7g+LM8nZpbzPd/67bg9WWfnp1hZvonx2BH9nnMgZfGDznglbTsc6X8HO+xEt3KAU/1DX BEqX1BSUCp8KTIBoGKykoi6IyFp5YMKcXTAfelo5DWhoraAYa/954vt3Q0t0qAAEmKUm /G6g== X-Forwarded-Encrypted: i=2; AJvYcCUUZ0snKiZVg0jkSoPAIpiQfoNps8giclcpU04dLr8C7SNzpWQ8sPvp+7JEIltLRedxXQ0AKoY6qna4951v@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yw5OJPbsHRp1ywl9MKvhxWoC1DLb5ThVaIEThC0y6+Z0+dKovZT ZSO7dy0zToRC7Nz4AudbWRLRaz2hKgSeTLuoqqpSfyd09/1uwbvbYd/eALmoZHcarA== X-Google-Smtp-Source: AGHT+IHAfupJXavmPV7RiXjSqLDrTYaFJDeC9icioniXyIlW4dTx36iBovNYqv6ozH7brK7IqE0DIg== X-Received: by 2002:a05:6402:510e:b0:5c2:609d:397e with SMTP id 4fb4d7f45d1cf-5c464a439d6mr6629642a12.15.1727016268979; Sun, 22 Sep 2024 07:44:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:3588:b0:5c4:2d99:a0c with SMTP id 4fb4d7f45d1cf-5c4595fbf77ls1166207a12.0.-pod-prod-02-eu; Sun, 22 Sep 2024 07:44:27 -0700 (PDT) X-Received: by 2002:a17:907:e204:b0:a8c:d6a3:d025 with SMTP id a640c23a62f3a-a90d50043f0mr773797366b.32.1727016267408; Sun, 22 Sep 2024 07:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727016267; cv=none; d=google.com; s=arc-20160816; b=g1q8Dd4rmBx/uRSM0/5OqWPCdFrASWVnDBFG6UMBRvNlvklpUKMsPogKmoIxzZ3eKu alGdvcsAGn6BOhoWDuDxo4Eghl7AtM4+eYLZJaOKDoyXJnljTdkH1IMDDD4T58eFRBeh kjvh1yCGmg+1VT4H6iFbovI7aRQ63kif4ceBo0Ndh0jij/hYsc/tUxhUlhDPpi6jLzYb PrzJBlj1r7WV5P+4Luky1fcde5BsKxkgapiUJhFki3G2xtJ5B7GZ/5D25xh/CGMNrUkz uFpRh0R/6I6SzdmuqvfOobb8K4/vwrrWMFnTaAjmpF8jcOZSyPCvXqGZlbHbzqAX2T0+ imbQ== 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:to:from:dkim-signature; bh=jXKyj9QfU6TS4dahNlEkSbG4SpYUyfzDDNO0f4/oKhE=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=RI3zIhaVL5R0d4kIuee29O6cbfMiZaMC9g3zLEKhHlCFnJMqFuUgqtRURk9JuVViaf ZRgLTRwugKR4aYX0maGdk6/iWq4Xk5MiCEUzc0XKdipJQ0btsGPth1kw6bEtE3EIqp2K YS/ndxQ3xRuEIH4qbXt1yg5yA6W7cxVavbpgJN7WXS9nKZfg5kTPUvXYBiVwY1dEHPaz vqGe7oXzp5D6QXQgBRKgXD3w3UdoGIu2CKdPStl3QXhaSWoJgIK1mar+uwn8H/rDB5bE q41qncEz3O9M8qaHvZ/lYBJApo4DNA/pFALca8eAw030gnsEKQaPRXZik7H39WilJgf9 r12A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=giXI1RAr; 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-a90610fbe01sor578619666b.8.2024.09.22.07.44.27 for (Google Transport Security); Sun, 22 Sep 2024 07:44: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-Received: by 2002:a17:906:6a07:b0:a90:c411:24e6 with SMTP id a640c23a62f3a-a90d5160783mr809363966b.61.1727016266730; Sun, 22 Sep 2024 07:44:26 -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-a90610968dbsm1090416566b.43.2024.09.22.07.44.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Sep 2024 07:44:26 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [iproute2, RESEND PATCH 2/2] arpd: drop useless initializers Date: Sun, 22 Sep 2024 16:44:24 +0200 Message-ID: <20240922144424.2103551-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240922144424.2103551-1-dario.binacchi@amarulasolutions.com> References: <20240922144424.2103551-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=giXI1RAr; 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;