From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202606 header.b=XxaVCHNZ; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id A5FA45A0271 for ; Thu, 09 Jul 2026 04:42:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202606; t=1783564947; bh=Rlrz59vrza7+4pMHWCSetasfHtWGqrbGT1I2a5LPmFQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XxaVCHNZNkYcq7mF9TnN52uHBDeH5JhOOVuE5ppRufCmMFSyeVWGb8lVRX4/Ao/FT J0Sew9uXZpliVh5xVsoSGKbU1HGsHLPuAW9EeuIrCLIfVC01wE0YP5sKnNPqrelXOx CldppLY8tsK64MoARdyKJQBtLJXrewCDzmwzx3+xBpJws0H2nXFQRy9Ayxx8y6HIPU hgl+qrtf0dP95g+8PMXorlC7lHDE+zK9V8bQ1EF+gCAodXHWtOnNtmMUcI+BY2P7bZ 0SpzWm3nOyH4LQbToPxtEBO+2TO10ZAi5jMBORFcE8ZhT+oslr7+7G7aZ5fdnNk6lb 7Rrj0Km+ZfrOw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gwfPv0Nppz58cc; Thu, 09 Jul 2026 12:42:27 +1000 (AEST) Date: Thu, 9 Jul 2026 12:22:17 +1000 From: David Gibson To: Jon Maloy Subject: Re: [PATCH 5/7] doc/migration: Fix buffer type mismatch in recv() call Message-ID: References: <20260708223203.885345-1-jmaloy@redhat.com> <20260708223203.885345-6-jmaloy@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xTQCrMC5IHjCq+uS" Content-Disposition: inline In-Reply-To: <20260708223203.885345-6-jmaloy@redhat.com> Message-ID-Hash: 3V3LO64LPQ6ZZ2MBEBSEFEB4FICHPLY5 X-Message-ID-Hash: 3V3LO64LPQ6ZZ2MBEBSEFEB4FICHPLY5 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sbrivio@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --xTQCrMC5IHjCq+uS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 08, 2026 at 06:32:01PM -0400, Jon Maloy wrote: > The compound literal passed to recv() was int (4 bytes) but only > 1 byte is received. Use int8_t to match the length, consistent with > the other recv() calls in this file and in source.c. >=20 > Signed-off-by: Jon Maloy Oops. Reviewed-by: David Gibson Although, arguably to act as better documentation it should actually check the value we get back from passt-repair. > --- > doc/migration/target.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/doc/migration/target.c b/doc/migration/target.c > index 0eb1f6ac..78cfd564 100644 > --- a/doc/migration/target.c > +++ b/doc/migration/target.c > @@ -69,7 +69,7 @@ int main(int argc, char **argv) > /* Send command to helper: turn repair mode on, wait for reply */ > cmd =3D TCP_REPAIR_ON; > sendmsg(s_helper, &msg, 0); > - recv(s_helper, &((int){ 0 }), 1, 0); > + recv(s_helper, &((int8_t){ 0 }), 1, 0); > =20 > /* Set sending sequence */ > seq =3D TCP_SEND_QUEUE; > --=20 > 2.52.0 >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --xTQCrMC5IHjCq+uS Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpPBdgACgkQzQJF27ox 2GcPrxAAhA3H97JUHBhHggPeblh+eOBOQWvhO1kPTp2GEIj5m5TI3LiIkcJhgI+l 0H3Sk4P9dGcsSLl0ESkQWO5Rg/SlAL84x2hMIdkxYjfVo4p8+6jBph73zFuA5V65 lZ9LK1LYImF8BdpMHglFCL+b9o+Mk5Aw5DrlBd0i9yUMOCL4HoDjSKeqmY+HcAT6 4ovVD+Cc4rdVx4zNtnOLitxS/jXJPPt/yxBao0DArfDWJj93o3O/oyJTYfTxbIMr HwquvQlmMAyzrj3TyLYu23vkVm9uFXTkKtsyjdl5WE++I2/606x8UCxdx8Go4PB1 hCGoAJ5d/KyNsFupufRgit7eKh7Crc9cLFarTVJHFFa3aO3aK8xmwz5or2UGcQom O5XI4Eo49jH7aLWBWnq5fzb1kPK1BBKBjFXoWdmQ9uzLYY7kg62Txsv5dO+N9V8l vKhCH5NTiiwIvB2XD1nbsvnYAqnEf4aJMpb9VUThq0cNb+4IP3m3BIpJ2AZ/5lje oT20e3kujfYu6BOL5idl4BkFcCu6RPNgzIHRMSi3ldZwdQcL5AfW0RIW/RGTNybB bLD0aduTivT9Jo0t9gSwh0AWic3Cihd5eJGaKn++EXVcEZoj12o0dltznHi7imPr mcLZnBpFbqtclvGHGlesVmF++qVx5bHdtBfAi1QWbvF16E1uXSU= =6Lhp -----END PGP SIGNATURE----- --xTQCrMC5IHjCq+uS--