From e5d8d558e954addf0e26ff887e9494d216da2225 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Thu, 26 Oct 2017 13:22:51 -0400 Subject: ~0 is actually more correct, or more portable --- ks.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'ks.c') diff --git a/ks.c b/ks.c index 000e109..b39e3f6 100644 --- a/ks.c +++ b/ks.c @@ -54,10 +54,7 @@ const hal_uuid_t hal_ks_pin_uuid = {{0}}; * result, leave the lru values alone and the right thing will happen. */ -#define BLOCK_UNUSED ((unsigned) -1) -/* Previous code used one's-complement ~0, which is exactly equal to - * two's-complement -1, but more obscure. - */ +#define BLOCK_UNUSED (~0U) hal_ks_block_t *hal_ks_cache_pick_lru(hal_ks_t *ks) { -- cgit v1.2.3