From patchwork Wed Feb 14 07:45:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13556039 Received: from wfout3-smtp.messagingengine.com (wfout3-smtp.messagingengine.com [64.147.123.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1D09125A4 for ; Wed, 14 Feb 2024 07:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707896747; cv=none; b=DzsssYVlsA0KFXdv9ouiRhXWTdT4SExN2h6yovg8ndo0mEIVTJSmCjk+TVrXo8AqR/3WXkw0iEvU9OgWiSxxkUBIXa/vV7QcoSAnYySHE0CjCmaarwn/nruUkUfxpPky3SVXRVVJYn/pjeo7coczt7qnVH231Y26eX9jsBRCAUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707896747; c=relaxed/simple; bh=HdRmAI7kUhFZKc0IFBGMbcSSo9lvlfNQ5/fsbkRU6o8=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CNv/bkSvD/NA8OIdMYCzBsvcg0BP7gpJUBVSUyIAwbMKkP1Y4o4mJPfZNyPqQaGy2Oj9wBKghrosqhkOTMr0TCV/IJkzw4NaVBdVXMHsArG2UGhK/OJ0YNZPuUMiijngZdqM9vVNWB5LL93mKtCF963z4ppxzXNQAZC3kp0Fa40= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=oVFn8mhh; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=NUSg/jWn; arc=none smtp.client-ip=64.147.123.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="oVFn8mhh"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="NUSg/jWn" Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.west.internal (Postfix) with ESMTP id 709551C000AF for ; Wed, 14 Feb 2024 02:45:44 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 14 Feb 2024 02:45:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1707896743; x=1707983143; bh=D0qUfCTQsS xupilXEVyxObeJVgUoWWw7AYNdqW0ec6o=; b=oVFn8mhhZmJSQUzpUQNyz3okb9 hEE+XSkpA/Wy0MFv8pQBFHQ+LZHfcl2AW4WdDucVrAwcaacfAD8lYttpfeNIja1e Hp20ta5WXqWFkTolh+uqXUXtUgFxrXkylkCMQYF/9+VGSenIO2mT2uaVl8VvVdgL RO4HO/Sml0RjMdKjKUnFvtleAkkod95653ONjQcUg0/7ss+gRv/hZgj3SH0Cf0NP OCFB0CDLLBArPTSAMmFlvfrI6bXNTiflwpe31xJaxKnRdVephVq1MyRamV3LdqPK Nm8M/T3auHUde/LPolBgr0XaOdQsNdpXcClr3N8ATTrjyAiVqMMgR72dSh+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1707896743; x=1707983143; bh=D0qUfCTQsSxupilXEVyxObeJVgUo WWw7AYNdqW0ec6o=; b=NUSg/jWnE2tb0wWM7LupQrvdGk1djDLM0mAJ+ftGRIyZ TbtBJGjsgtecs88L38bifKO/EWzMFnt82HOXTFNqyCkpKR8U+uI4XHa75GvewGc/ pzL9a54sORtFfUvbOM87QxNwdb78EV9KTbBMl9FIu0ro6v/xpo9MYavkaeAbzGev VUwpEfYTbO+4r+9qE6iYPxMsBUx17yD2jPgxS5mebe9xHjIchvoG/AY14Ym7OcKR queyRL6c3TQlv2wD83MJ86L9GtUy3jIWflBgg40WKzpRfERMHinu17L98yrixOqD Yo7TTDO3utDdJvSB2CrkJvVLfViriUlZdekFCfgLMA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeigdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtvdenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehp khhsrdhimheqnecuggftrfgrthhtvghrnhepheeghfdtfeeuffehkefgffduleffjedthf dvjeektdfhhedvlefgtefgvdettdfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 14 Feb 2024 02:45:43 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 1290adf9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Wed, 14 Feb 2024 07:41:53 +0000 (UTC) Date: Wed, 14 Feb 2024 08:45:41 +0100 From: Patrick Steinhardt To: git@vger.kernel.org Subject: [PATCH 01/12] reftable/pq: use `size_t` to track iterator index Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The reftable priority queue is used by the merged iterator to yield records from its sub-iterators in the expected order. Each entry has a record corresponding to such a sub-iterator as well as an index that indicates which sub-iterator the record belongs to. But while the sub-iterators are tracked with a `size_t`, we store the index as an `int` in the entry. Fix this and use `size_t` consistently. Signed-off-by: Patrick Steinhardt --- reftable/pq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reftable/pq.h b/reftable/pq.h index e85bac9b52..9e25a43a36 100644 --- a/reftable/pq.h +++ b/reftable/pq.h @@ -12,7 +12,7 @@ license that can be found in the LICENSE file or at #include "record.h" struct pq_entry { - int index; + size_t index; struct reftable_record rec; };