aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-26 13:22:51 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-27 16:10:39 -0400
commite5d8d558e954addf0e26ff887e9494d216da2225 (patch)
tree9712afc4fddb6ea61197f5706cb79e3c953577d5
parentca84af553cbaae45b17cce04d457b2e61cc4277c (diff)
~0 is actually more correct, or more portable
-rw-r--r--ks.c5
1 files changed, 1 insertions, 4 deletions
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)
{