From b86afffe3cb50df68b62aa07adb8268a4db7ceb5 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Mon, 14 Mar 2016 23:34:50 -0400 Subject: [PATCH] neaten --- c/containers/hss.c | 2 +- c/containers/lhms2v.c | 2 +- c/containers/lhmsi.c | 2 +- c/containers/lhmslv.c | 2 +- c/containers/lhmss.c | 2 +- c/containers/lhmsv.c | 2 +- c/containers/mlhmmv.c | 3 +-- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/c/containers/hss.c b/c/containers/hss.c index 0bfa66073..0a1ef6b7a 100644 --- a/c/containers/hss.c +++ b/c/containers/hss.c @@ -70,7 +70,7 @@ void hss_free(hss_t* pset) { // ---------------------------------------------------------------- // Used by get() and remove(). -// Returns >0 for where the key is *or* should go (end of chain). +// Returns >=0 for where the key is *or* should go (end of chain). static int hss_find_index_for_key(hss_t* pset, char* key, int* pideal_index) { int hash = mlr_string_hash_func(key); int index = mlr_canonical_mod(hash, pset->array_length); diff --git a/c/containers/lhms2v.c b/c/containers/lhms2v.c index 52bfd4fab..d1cfe58f3 100644 --- a/c/containers/lhms2v.c +++ b/c/containers/lhms2v.c @@ -91,7 +91,7 @@ void lhms2v_free(lhms2v_t* pmap) { // ---------------------------------------------------------------- // Used by get() and remove(). -// Returns >0 for where the key is *or* should go (end of chain). +// Returns >=0 for where the key is *or* should go (end of chain). static int lhms2v_find_index_for_key(lhms2v_t* pmap, char* key1, char* key2, int* pideal_index) { int hash = mlr_string_pair_hash_func(key1, key2); int index = mlr_canonical_mod(hash, pmap->array_length); diff --git a/c/containers/lhmsi.c b/c/containers/lhmsi.c index 645f597e2..f9258ddb3 100644 --- a/c/containers/lhmsi.c +++ b/c/containers/lhmsi.c @@ -97,7 +97,7 @@ void lhmsi_free(lhmsi_t* pmap) { // ---------------------------------------------------------------- // Used by get() and remove(). -// Returns >0 for where the key is *or* should go (end of chain). +// Returns >=0 for where the key is *or* should go (end of chain). static int lhmsi_find_index_for_key(lhmsi_t* pmap, char* key, int* pideal_index) { int hash = mlr_string_hash_func(key); int index = mlr_canonical_mod(hash, pmap->array_length); diff --git a/c/containers/lhmslv.c b/c/containers/lhmslv.c index a23015986..e19de7bfe 100644 --- a/c/containers/lhmslv.c +++ b/c/containers/lhmslv.c @@ -88,7 +88,7 @@ void lhmslv_free(lhmslv_t* pmap) { // ---------------------------------------------------------------- // Used by get() and remove(). -// Returns >0 for where the key is *or* should go (end of chain). +// Returns >=0 for where the key is *or* should go (end of chain). static int lhmslv_find_index_for_key(lhmslv_t* pmap, slls_t* key, int* pideal_index) { int hash = slls_hash_func(key); int index = mlr_canonical_mod(hash, pmap->array_length); diff --git a/c/containers/lhmss.c b/c/containers/lhmss.c index 7ba8a5f14..d65fe54f8 100644 --- a/c/containers/lhmss.c +++ b/c/containers/lhmss.c @@ -99,7 +99,7 @@ void lhmss_free(lhmss_t* pmap) { // ---------------------------------------------------------------- // Used by get() and remove(). -// Returns >0 for where the key is *or* should go (end of chain). +// Returns >=0 for where the key is *or* should go (end of chain). static int lhmss_find_index_for_key(lhmss_t* pmap, char* key, int* pideal_index) { int hash = mlr_string_hash_func(key); int index = mlr_canonical_mod(hash, pmap->array_length); diff --git a/c/containers/lhmsv.c b/c/containers/lhmsv.c index d614c8986..728437715 100644 --- a/c/containers/lhmsv.c +++ b/c/containers/lhmsv.c @@ -91,7 +91,7 @@ void lhmsv_free(lhmsv_t* pmap) { // ---------------------------------------------------------------- // Used by get() and remove(). -// Returns >0 for where the key is *or* should go (end of chain). +// Returns >=0 for where the key is *or* should go (end of chain). static int lhmsv_find_index_for_key(lhmsv_t* pmap, char* key, int* pideal_index) { int hash = mlr_string_hash_func(key); int index = mlr_canonical_mod(hash, pmap->array_length); diff --git a/c/containers/mlhmmv.c b/c/containers/mlhmmv.c index 5dd56fef3..b9d16870e 100644 --- a/c/containers/mlhmmv.c +++ b/c/containers/mlhmmv.c @@ -134,8 +134,7 @@ static void mlhmmv_level_free(mlhmmv_level_t* plevel) { // ---------------------------------------------------------------- // Used by get() and remove(). -// xxx s.b. >=0? if so fix all comments (lhm*). -// Returns >0 for where the key is *or* should go (end of chain). +// Returns >=0 for where the key is *or* should go (end of chain). static int mlhmmv_level_find_index_for_key(mlhmmv_level_t* plevel, mv_t* plevel_key, int* pideal_index) { int hash = mlhmmv_hash_func(plevel_key); int index = mlr_canonical_mod(hash, plevel->array_length);