From 0c770f015ef72ae90079af7373b9b2c553461071 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 8 Jun 2021 00:28:58 +0100 Subject: [PATCH] base/ct.[ch]: Set the return type of `ct_pick' correctly. This is, technically speaking, an API break. But I don't think anything actually cares, this is an improvement, and the ABI is unchanged on every platform I can think of. --- base/ct.c | 2 +- base/ct.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/ct.c b/base/ct.c index 5393450b..989f8d6f 100644 --- a/base/ct.c +++ b/base/ct.c @@ -105,7 +105,7 @@ int ct_intle(uint32 x, uint32 y) * constant time. */ -int ct_pick(uint32 a, uint32 x0, uint32 x1) +uint32 ct_pick(uint32 a, uint32 x0, uint32 x1) { uint32 m = MASK(a); return (x0&~m) | (x1&m); } /* --- @ct_condcopy@ --- * diff --git a/base/ct.h b/base/ct.h index 445d889d..81f49cb0 100644 --- a/base/ct.h +++ b/base/ct.h @@ -72,7 +72,7 @@ extern int ct_intle(uint32 /*x*/, uint32 /*y*/); * constant time. */ -extern int ct_pick(uint32 /*a*/, uint32 /*x0*/, uint32 /*x1*/); +extern uint32 ct_pick(uint32 /*a*/, uint32 /*x0*/, uint32 /*x1*/); /* --- @ct_condcopy@ --- * * -- 2.11.0