rcuja: fix below/above "or equal" lookup
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 9 Jun 2013 21:05:06 +0000 (17:05 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 9 Jun 2013 21:05:06 +0000 (17:05 -0400)
"or equal" was missing for 0 et max value.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rcuja/rcuja.c

index a16385b06f0f923dc5e2c603a7d3948057411d09..a791d5b29687b3daf90927ff263a0a6c3f7405f0 100644 (file)
@@ -1820,11 +1820,11 @@ struct cds_ja_node *cds_ja_lookup_inequality(struct cds_ja *ja, uint64_t key,
 
        switch (mode) {
        case JA_LOOKUP_BE:
-               if (caa_unlikely(key > ja->key_max || key == 0))
+               if (caa_unlikely(key > ja->key_max))
                        return NULL;
                break;
        case JA_LOOKUP_AE:
-               if (caa_unlikely(key >= ja->key_max))
+               if (caa_unlikely(key > ja->key_max))
                        return NULL;
                break;
        default:
This page took 0.027951 seconds and 4 git commands to generate.