summaryrefslogtreecommitdiffstats
path: root/lib/xarray.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xarray.c')
-rw-r--r--lib/xarray.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/xarray.c b/lib/xarray.c
index bbacca576593..5f3f9311de89 100644
--- a/lib/xarray.c
+++ b/lib/xarray.c
@@ -1131,7 +1131,7 @@ void *xas_find_marked(struct xa_state *xas, unsigned long max, xa_mark_t mark)
1131 entry = xa_head(xas->xa); 1131 entry = xa_head(xas->xa);
1132 xas->xa_node = NULL; 1132 xas->xa_node = NULL;
1133 if (xas->xa_index > max_index(entry)) 1133 if (xas->xa_index > max_index(entry))
1134 goto bounds; 1134 goto out;
1135 if (!xa_is_node(entry)) { 1135 if (!xa_is_node(entry)) {
1136 if (xa_marked(xas->xa, mark)) 1136 if (xa_marked(xas->xa, mark))
1137 return entry; 1137 return entry;
@@ -1180,11 +1180,9 @@ void *xas_find_marked(struct xa_state *xas, unsigned long max, xa_mark_t mark)
1180 } 1180 }
1181 1181
1182out: 1182out:
1183 if (!max) 1183 if (xas->xa_index > max)
1184 goto max; 1184 goto max;
1185bounds: 1185 return set_bounds(xas);
1186 xas->xa_node = XAS_BOUNDS;
1187 return NULL;
1188max: 1186max:
1189 xas->xa_node = XAS_RESTART; 1187 xas->xa_node = XAS_RESTART;
1190 return NULL; 1188 return NULL;