diff options
Diffstat (limited to 'lib/xarray.c')
-rw-r--r-- | lib/xarray.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xarray.c b/lib/xarray.c index 446b956c9188..1237c213f52b 100644 --- a/lib/xarray.c +++ b/lib/xarray.c | |||
@@ -994,6 +994,8 @@ void *__xas_prev(struct xa_state *xas) | |||
994 | 994 | ||
995 | if (!xas_frozen(xas->xa_node)) | 995 | if (!xas_frozen(xas->xa_node)) |
996 | xas->xa_index--; | 996 | xas->xa_index--; |
997 | if (!xas->xa_node) | ||
998 | return set_bounds(xas); | ||
997 | if (xas_not_node(xas->xa_node)) | 999 | if (xas_not_node(xas->xa_node)) |
998 | return xas_load(xas); | 1000 | return xas_load(xas); |
999 | 1001 | ||
@@ -1031,6 +1033,8 @@ void *__xas_next(struct xa_state *xas) | |||
1031 | 1033 | ||
1032 | if (!xas_frozen(xas->xa_node)) | 1034 | if (!xas_frozen(xas->xa_node)) |
1033 | xas->xa_index++; | 1035 | xas->xa_index++; |
1036 | if (!xas->xa_node) | ||
1037 | return set_bounds(xas); | ||
1034 | if (xas_not_node(xas->xa_node)) | 1038 | if (xas_not_node(xas->xa_node)) |
1035 | return xas_load(xas); | 1039 | return xas_load(xas); |
1036 | 1040 | ||