mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-08 21:44:39 +02:00
Sync OpenBSD patchset 1008:
Use RB trees not SPLAY.
This commit is contained in:
@ -107,7 +107,7 @@ cmd_bind_key_table(struct cmd *self, struct cmd_ctx *ctx, int key)
|
||||
|
||||
mtmp.key = key;
|
||||
mtmp.mode = !!args_has(args, 'c');
|
||||
if ((mbind = SPLAY_FIND(mode_key_tree, mtab->tree, &mtmp)) != NULL) {
|
||||
if ((mbind = RB_FIND(mode_key_tree, mtab->tree, &mtmp)) != NULL) {
|
||||
mbind->cmd = cmd;
|
||||
return (0);
|
||||
}
|
||||
@ -115,6 +115,6 @@ cmd_bind_key_table(struct cmd *self, struct cmd_ctx *ctx, int key)
|
||||
mbind->key = mtmp.key;
|
||||
mbind->mode = mtmp.mode;
|
||||
mbind->cmd = cmd;
|
||||
SPLAY_INSERT(mode_key_tree, mtab->tree, mbind);
|
||||
RB_INSERT(mode_key_tree, mtab->tree, mbind);
|
||||
return (0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user