summaryrefslogtreecommitdiff
path: root/openbsd-compat/sys-tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/sys-tree.h')
-rw-r--r--openbsd-compat/sys-tree.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsd-compat/sys-tree.h b/openbsd-compat/sys-tree.h
index 0a58710c9..927ca04cd 100644
--- a/openbsd-compat/sys-tree.h
+++ b/openbsd-compat/sys-tree.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tree.h,v 1.6 2002/06/11 22:09:52 provos Exp $ */ 1/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * All rights reserved. 4 * All rights reserved.
@@ -343,12 +343,13 @@ struct { \
343 RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ 343 RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
344 else \ 344 else \
345 RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ 345 RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
346 RB_AUGMENT(RB_PARENT(elm, field)); \
347 } else \ 346 } else \
348 (head)->rbh_root = (tmp); \ 347 (head)->rbh_root = (tmp); \
349 RB_LEFT(tmp, field) = (elm); \ 348 RB_LEFT(tmp, field) = (elm); \
350 RB_PARENT(elm, field) = (tmp); \ 349 RB_PARENT(elm, field) = (tmp); \
351 RB_AUGMENT(tmp); \ 350 RB_AUGMENT(tmp); \
351 if ((RB_PARENT(tmp, field))) \
352 RB_AUGMENT(RB_PARENT(tmp, field)); \
352} while (0) 353} while (0)
353 354
354#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ 355#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
@@ -362,12 +363,13 @@ struct { \
362 RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ 363 RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
363 else \ 364 else \
364 RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ 365 RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
365 RB_AUGMENT(RB_PARENT(elm, field)); \
366 } else \ 366 } else \
367 (head)->rbh_root = (tmp); \ 367 (head)->rbh_root = (tmp); \
368 RB_RIGHT(tmp, field) = (elm); \ 368 RB_RIGHT(tmp, field) = (elm); \
369 RB_PARENT(elm, field) = (tmp); \ 369 RB_PARENT(elm, field) = (tmp); \
370 RB_AUGMENT(tmp); \ 370 RB_AUGMENT(tmp); \
371 if ((RB_PARENT(tmp, field))) \
372 RB_AUGMENT(RB_PARENT(tmp, field)); \
371} while (0) 373} while (0)
372 374
373/* Generates prototypes and inline functions */ 375/* Generates prototypes and inline functions */