flexelinting

parent 72bb92f0
......@@ -244,8 +244,8 @@ static void
shardcfg_hashcircle(struct sharddir *shardd)
{
const struct shard_backend *backends, *b;
int j, h;
uint32_t i, n_points, r, rmax;
int h;
uint32_t i, j, n_points, r, rmax;
const char *ident;
const int len = 12; // log10(UINT32_MAX) + 2;
char s[len];
......@@ -578,7 +578,8 @@ shardcfg_apply_change(VRT_CTX, struct sharddir *shardd,
if (replicas * task->weight > UINT32_MAX)
b_replicas = UINT32_MAX;
else
b_replicas = replicas * task->weight;
b_replicas = (uint32_t) // flint
(replicas * task->weight);
shardcfg_backend_add(&re, task->priv,
b_replicas);
......
......@@ -259,7 +259,7 @@ init_state(struct shard_state *state,
state->ctx = ctx;
state->shardd = shardd;
state->idx = -1;
state->idx = UINT32_MAX;
state->picklist = picklist;
/* healhy and changed only defined for hostid != -1 */
......@@ -319,8 +319,9 @@ sharddir_pick_be_locked(VRT_CTX, const struct sharddir *shardd, uint32_t key,
validate_alt(ctx, shardd, &alt);
state->idx = shard_lookup(shardd, key);
assert(state->idx < UINT32_MAX);
SHDBG(SHDBG_LOOKUP, shardd, "lookup key %x idx %d host %u",
SHDBG(SHDBG_LOOKUP, shardd, "lookup key %x idx %u host %u",
key, state->idx, shardd->hashcircle[state->idx].host);
if (alt > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment