chiark / gitweb /
disobedience: Clear out the root before refilling it.
authorrjk@greenend.org.uk <>
Sat, 7 Jul 2007 15:57:35 +0000 (16:57 +0100)
committerrjk@greenend.org.uk <>
Sat, 7 Jul 2007 15:57:35 +0000 (16:57 +0100)
disobedience/choose.c

index d7df7ddb2830aa3800ed17bf11ce5017cb0ca0b6..af811f0a8edf9e3ab6e88cb493179aaa98adc3a7 100644 (file)
@@ -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) {