~ubuntu-branches/ubuntu/utopic/haproxy/utopic-proposed

« back to all changes in this revision

Viewing changes to ebtree/eb32tree.c

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2010-06-18 00:42:53 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100618004253-ygka2bh6nblkhfj2
Tags: 1.4.8-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Elastic Binary Trees - exported functions for operations on 32bit nodes.
3
 
 * (C) 2002-2009 - Willy Tarreau <w@1wt.eu>
 
3
 * Version 6.0
 
4
 * (C) 2002-2010 - Willy Tarreau <w@1wt.eu>
4
5
 *
5
6
 * This program is free software; you can redistribute it and/or modify
6
7
 * it under the terms of the GNU General Public License as published by
97
98
                         * small and we need to get its highest value, or it is
98
99
                         * too large, and we need to get the prev value.
99
100
                         */
100
 
                        if ((node->key >> node->node.bit) > (x >> node->node.bit)) {
 
101
                        if ((node->key >> node->node.bit) < (x >> node->node.bit)) {
101
102
                                troot = node->node.branches.b[EB_RGHT];
102
103
                                return eb32_entry(eb_walk_down(troot, EB_RGHT), struct eb32_node, node);
103
104
                        }