Immediately quit routines if fwrite() fails - further writes will
[obnox/wireshark/wip.git] / gtk / stats_tree_stat.c
index 1db3bf845c44737be749c130f1f1fe1e0068bb3b..e2caf8c9d3f30f39ad14ea1fa30b310394517b29 100644 (file)
@@ -131,7 +131,8 @@ static void draw_gtk_node(stat_node* node) {
        static gchar percent[NUM_BUF_SIZE];
        stat_node* child;
        
-       stats_tree_get_strs_from_node(node, value, rate, percent);
+       stats_tree_get_strs_from_node(node, value, rate,
+                                     percent);
        
 #if GTK_MAJOR_VERSION >= 2
        if (node->st->pr->store && node->pr->iter) {
@@ -210,7 +211,7 @@ static void clear_node_pr(stat_node* n) {
        }
 #else
        if (n->pr->node) {
-               gtk_ctree_remove_node(GKT_CTREE(n->st->pr->ctree),n->pr->node);
+               gtk_ctree_remove_node(GTK_CTREE(n->st->pr->ctree),n->pr->node);
                n->pr->node = NULL;
        }
 #endif
@@ -233,8 +234,8 @@ static void init_gtk_tree(const char* optarg, void *userdata _U_) {
        stats_tree* st = NULL;
        stats_tree_cfg* cfg = NULL;
        tree_pres* pr = g_malloc(sizeof(tree_pres));
-       guint8* title = NULL;
-       guint8* window_name = NULL;
+       gchar* title = NULL;
+       gchar* window_name = NULL;
        GString* error_string;
        GtkWidget *scr_win;
        guint init_strlen;
@@ -268,7 +269,7 @@ static void init_gtk_tree(const char* optarg, void *userdata _U_) {
                                if (init_strlen == strlen(optarg)) {
                                        st = stats_tree_new(cfg,pr,NULL);
                                } else { 
-                                       st = stats_tree_new(cfg,pr,((guint8*)optarg)+init_strlen+1);
+                                       st = stats_tree_new(cfg,pr,(char*)optarg+init_strlen+1);
                                }
                                
                        } else {
@@ -371,11 +372,11 @@ static void init_gtk_tree(const char* optarg, void *userdata _U_) {
        gtk_container_add( GTK_CONTAINER(main_vb), scr_win);
        
        error_string = register_tap_listener( cfg->tapname,
-                                                                                 st,
-                                                                                 st->filter,
-                                                                                 reset_tap,
-                                                                                 stats_tree_packet,
-                                                                                 draw_gtk_tree);
+                                             st,
+                                             st->filter,
+                                             reset_tap,
+                                             stats_tree_packet,
+                                             draw_gtk_tree);
        
        if (error_string) {
                /* error, we failed to attach to the tap. clean up */