Polish min usage for SunCC

Fixes: left operand must be modifiable lvalue: op "="

Same as: 64f7181b

This leaves exactly one commit after the coccinelle efforts.
What a waste of time. :|
parent b6b97907
......@@ -105,7 +105,7 @@ vcl_acl_cmp(const struct acl_e *ae1, const struct acl_e *ae2)
p1 = ae1->data;
p2 = ae2->data;
m = vmin(ae1->mask, ae2->mask);
m = vmin_t(unsigned, ae1->mask, ae2->mask);
for (; m >= 8; m -= 8) {
CMP(*p1, *p2);
p1++;
......
......@@ -275,7 +275,7 @@ shardcfg_hashcircle(struct sharddir *shardd)
rmax = (UINT32_MAX - 1) / shardd->n_backend;
for (b = backends; b < backends + shardd->n_backend; b++) {
CHECK_OBJ_NOTNULL(b->backend, DIRECTOR_MAGIC);
n_points += vmin(b->replicas, rmax);
n_points += vmin_t(uint32_t, b->replicas, rmax);
}
assert(n_points < UINT32_MAX);
......@@ -291,7 +291,7 @@ shardcfg_hashcircle(struct sharddir *shardd)
AN(ident);
assert(ident[0] != '\0');
r = vmin(b->replicas, rmax);
r = vmin_t(uint32_t, b->replicas, rmax);
for (j = 0; j < r; j++) {
assert(snprintf(s, len, "%d", j) < len);
......
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