Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/include/linux interval_tree_iter_next:...
details: https://anonhg.NetBSD.org/src/rev/584faf9eb0d3
branches: trunk
changeset: 447219:584faf9eb0d3
user: tnn <tnn%NetBSD.org@localhost>
date: Fri Jan 04 20:22:32 2019 +0000
description:
interval_tree_iter_next: check the node we return, not the prev one.
Also assert that the interval is intersecting the requested boundary.
diffstat:
sys/external/bsd/drm2/include/linux/interval_tree.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 7230b6f66cf6 -r 584faf9eb0d3 sys/external/bsd/drm2/include/linux/interval_tree.h
--- a/sys/external/bsd/drm2/include/linux/interval_tree.h Fri Jan 04 19:54:56 2019 +0000
+++ b/sys/external/bsd/drm2/include/linux/interval_tree.h Fri Jan 04 20:22:32 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: interval_tree.h,v 1.7 2018/08/28 03:34:53 riastradh Exp $ */
+/* $NetBSD: interval_tree.h,v 1.8 2019/01/04 20:22:32 tnn Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -119,9 +119,9 @@
node = rb_tree_find_node_geq(&root->rbr_tree, &start);
if (node == NULL)
return NULL;
- KASSERT(node->start <= start);
if (last < node->start)
return NULL;
+ KASSERT(node->start <= last && node->last >= start);
return node;
}
@@ -141,9 +141,9 @@
next = rb_tree_iterate(&root->rbr_tree, node, RB_DIR_RIGHT);
if (next == NULL)
return NULL;
- KASSERT(node->start <= start);
- if (last < node->start)
+ if (last < next->start)
return NULL;
+ KASSERT(next->start <= last && next->last >= start);
return next;
}
Home |
Main Index |
Thread Index |
Old Index