]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - buffer_tree.c
aft.c: Silence scan-build warning.
[paraslash.git] / buffer_tree.c
index cb9d514f1aa5adfc501d5eee89150b7aa31821bc..7d79636fac717f4e4cb8559dec698f8204eed34c 100644 (file)
@@ -1,12 +1,11 @@
 /*
- * Copyright (C) 2009-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2009-2012 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
 /** \file buffer_tree.c Buffer tree and buffer pool implementations. */
 #include <regex.h>
-#include <stdbool.h>
 
 #include "para.h"
 #include "list.h"
@@ -762,7 +761,7 @@ void btr_remove_node(struct btr_node *btrn)
 
        if (!btrn)
                return;
-       PARA_NOTICE_LOG("removing btr node %s from buffer tree\n", btrn->name);
+       PARA_INFO_LOG("removing btr node %s from buffer tree\n", btrn->name);
        FOR_EACH_CHILD(ch, btrn)
                ch->parent = NULL;
        btr_drain(btrn);
@@ -826,6 +825,7 @@ void btr_splice_out_node(struct btr_node *btrn)
                        list_move(&ch->node, &btrn->parent->children);
        }
        assert(list_empty(&btrn->children));
+       btrn->parent = NULL;
 }
 
 /**
@@ -879,7 +879,7 @@ int btr_exec_up(struct btr_node *btrn, const char *command, char **value_result)
                if (ret < 0)
                        return ret;
                if (value_result && *value_result)
-                       PARA_NOTICE_LOG("%s(%s): %s\n", command, parent->name,
+                       PARA_INFO_LOG("%s(%s): %s\n", command, parent->name,
                                *value_result);
                return 1;
        }