snapshot v2/p6; fix bug in preserve
This commit is contained in:
parent
ce1fd99c3e
commit
0e0f1beef7
10
include/sl.h
10
include/sl.h
|
@ -461,10 +461,16 @@
|
||||||
static int __skip_preserve_##decl(decl##_t *slist, decl##_node_t **path, size_t len) \
|
static int __skip_preserve_##decl(decl##_t *slist, decl##_node_t **path, size_t len) \
|
||||||
{ \
|
{ \
|
||||||
int rc = 0, n = 0; \
|
int rc = 0, n = 0; \
|
||||||
size_t i; \
|
size_t i = 0; \
|
||||||
decl##_node_t *node = path[0]; \
|
decl##_node_t *node; \
|
||||||
|
\
|
||||||
|
if (path == NULL) \
|
||||||
|
return 0; \
|
||||||
\
|
\
|
||||||
for (i = 0; i < len; i++) { \
|
for (i = 0; i < len; i++) { \
|
||||||
|
node = path[i]; \
|
||||||
|
if (node == NULL) \
|
||||||
|
continue; \
|
||||||
if (path[i]->field.sle.gen < slist->gen) { \
|
if (path[i]->field.sle.gen < slist->gen) { \
|
||||||
if (path[i] == slist->slh_head || path[i] == slist->slh_tail) \
|
if (path[i] == slist->slh_head || path[i] == slist->slh_tail) \
|
||||||
continue; \
|
continue; \
|
||||||
|
|
Loading…
Reference in a new issue