change to int the return type of manip_stat_node() so that it can be used as a parent
authorlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 25 Feb 2005 05:14:38 +0000 (05:14 +0000)
committerlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 25 Feb 2005 05:14:38 +0000 (05:14 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13508 f5534014-38df-0310-8fa8-9805f1628bb7

epan/stats_tree.c
epan/stats_tree.h

index b93b0482eac3451bbceb9f7678993e33729ecd9c..24f8df2df1d0325e97d4fd9440f720bb2a3cdbdc 100644 (file)
@@ -437,7 +437,7 @@ extern int create_node_with_parent_name(stats_tree* st,
  * using parent_name as parent node.
  * with_hash=TRUE to indicate that the created node will have a parent
  */
-extern guint8* manip_stat_node(manip_node_mode mode, stats_tree* st, const guint8* name, int parent_id, gboolean with_hash, gint value) {
+extern int manip_stat_node(manip_node_mode mode, stats_tree* st, const guint8* name, int parent_id, gboolean with_hash, gint value) {
        stat_node* node = NULL;
        stat_node* parent = NULL;
        
@@ -462,9 +462,9 @@ extern guint8* manip_stat_node(manip_node_mode mode, stats_tree* st, const guint
        }
        
        if (node) 
-               return node->name;
+               return node->id;
        else
-               return NULL;
+               return -1;
 }
 
 
index dbeb7c287b2b81b6b2c3aafc13ce07f23b4c0418..2deb6325749add6ea590a1191413f91cb2887fa0 100644 (file)
@@ -122,7 +122,7 @@ extern int tick_pivot(stats_tree* st,
  * with_children=TRUE to indicate that the created node will be a parent
  */
 typedef enum _manip_node_mode { MN_INCREASE, MN_SET } manip_node_mode;
-extern guint8* manip_stat_node(manip_node_mode mode,
+extern int manip_stat_node(manip_node_mode mode,
                                                           stats_tree* st,
                                                           const guint8* name,
                                                           int parent_id,