mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 12:36:20 +00:00
Merge pull request #7474 from eololab/fix-crash-skiplist-debug
lib, bgpd: fix crash using skiplist debug function
This commit is contained in:
commit
15675d025d
@ -74,7 +74,6 @@ DEFINE_MTYPE_STATIC(LIB, SKIP_LIST_NODE, "Skip Node")
|
|||||||
|
|
||||||
static int randomsLeft;
|
static int randomsLeft;
|
||||||
static int randomBits;
|
static int randomBits;
|
||||||
static struct skiplist *skiplist_last_created; /* debugging hack */
|
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
#define CHECKLAST(sl) \
|
#define CHECKLAST(sl) \
|
||||||
@ -150,8 +149,6 @@ struct skiplist *skiplist_new(int flags,
|
|||||||
if (del)
|
if (del)
|
||||||
new->del = del;
|
new->del = del;
|
||||||
|
|
||||||
skiplist_last_created = new; /* debug */
|
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -586,7 +583,8 @@ void skiplist_debug(struct vty *vty, struct skiplist *l)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!l)
|
if (!l)
|
||||||
l = skiplist_last_created;
|
return;
|
||||||
|
|
||||||
vty_out(vty, "Skiplist %p has max level %d\n", l, l->level);
|
vty_out(vty, "Skiplist %p has max level %d\n", l, l->level);
|
||||||
for (i = l->level; i >= 0; --i)
|
for (i = l->level; i >= 0; --i)
|
||||||
vty_out(vty, " @%d: %ld\n", i,
|
vty_out(vty, " @%d: %ld\n", i,
|
||||||
|
Loading…
Reference in New Issue
Block a user