summaryrefslogtreecommitdiff
path: root/rbtree.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-11-06 19:54:05 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-11-06 19:54:05 -0800
commitef11aa889bf101e6b980eeece63a7e24b0354fc2 (patch)
treebf350d52142ebb42094fe1b9d838558a1bfa3776 /rbtree.c
parent674788166f240997f723751e6c77021f5cc5428f (diff)
downloadnasm-ef11aa889bf101e6b980eeece63a7e24b0354fc2.tar.gz
nasm-ef11aa889bf101e6b980eeece63a7e24b0354fc2.tar.bz2
nasm-ef11aa889bf101e6b980eeece63a7e24b0354fc2.zip
rbtree: drop "const" from search function
Having the search argument and result be "const" is nice in theory, but causes problems in practice. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'rbtree.c')
-rw-r--r--rbtree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rbtree.c b/rbtree.c
index 7e13bff..618b4f8 100644
--- a/rbtree.c
+++ b/rbtree.c
@@ -12,9 +12,9 @@
#include "rbtree.h"
-const struct rbtree *rb_search(const struct rbtree *tree, uint64_t key)
+struct rbtree *rb_search(struct rbtree *tree, uint64_t key)
{
- const struct rbtree *best = NULL;
+ struct rbtree *best = NULL;
while (tree) {
if (tree->key == key)