From: rjk@greenend.org.uk <> Date: Sat, 7 Jul 2007 15:57:35 +0000 (+0100) Subject: disobedience: Clear out the root before refilling it. X-Git-Tag: 5.0.3~717 X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/commitdiff_plain/77d95881e7050083d85a67c0942c046f24977adc?hp=137e36ed2877b136e5fb0b7f5eead77be4d1ae3f disobedience: Clear out the root before refilling it. --- diff --git a/disobedience/choose.c b/disobedience/choose.c index d7df7dd..af811f0 100644 --- a/disobedience/choose.c +++ b/disobedience/choose.c @@ -93,6 +93,7 @@ static int nsearchresults; /* number of results */ /* Forward Declarations */ +static void clear_children(struct choosenode *cn); static struct choosenode *newnode(struct choosenode *parent, const char *path, const char *display, @@ -174,6 +175,7 @@ static void fill_root_node(struct choosenode *cn) { struct callbackdata *cbd; D(("fill_root_node")); + clear_children(cn); if(choosealpha) { if(!cn->children.nvec) { /* Only need to do this once */ for(ch = 'A'; ch <= 'Z'; ++ch) {