aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/h225_counter.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-06 03:44:55 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-08-06 03:44:55 +0000
commitf026752489e09f18ac113ec6482e1abb0e420646 (patch)
tree32b19974cee8f9cb038186254b92b64e98975504 /gtk/h225_counter.c
parent23f9886d057ac7a7009ed4e7670321d577198eca (diff)
Squelch more const warnings (and fix some memory leaks that found).
_U_-ify some unused arguments, rather than assigning them to themselves. Un-constify one variable that gets assigned a mallocated pointer. Clean up indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15236 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/h225_counter.c')
-rw-r--r--gtk/h225_counter.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gtk/h225_counter.c b/gtk/h225_counter.c
index e6d1c6095d..c7cb4858f5 100644
--- a/gtk/h225_counter.c
+++ b/gtk/h225_counter.c
@@ -54,7 +54,7 @@
#include "ui_util.h"
-static void gtk_h225counter_init(char *optarg);
+static void gtk_h225counter_init(const char *optarg);
static tap_dfilter_dlg h225_counter_dlg = {
"H.225 Messages and Message Reasons",
@@ -497,23 +497,23 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
}
-static const gchar *titles[]={"Message Type or Reason",
+static const gchar *titles[]={
+ "Message Type or Reason",
"Count" };
static void
-gtk_h225counter_init(char *optarg)
+gtk_h225counter_init(const char *optarg)
{
h225counter_t *hs;
- char *filter=NULL;
+ const char *filter=NULL;
GString *error_string;
- GtkWidget *bbox;
- GtkWidget *close_bt;
+ GtkWidget *bbox;
+ GtkWidget *close_bt;
if(strncmp(optarg,"h225,counter,",13) == 0){
filter=optarg+13;
} else {
- filter=g_malloc(1);
- *filter='\0';
+ filter="";
}
hs=g_malloc(sizeof(h225counter_t));
@@ -548,13 +548,13 @@ gtk_h225counter_init(char *optarg)
gtk_box_pack_end(GTK_BOX(hs->vbox), bbox, FALSE, FALSE, 0);
close_bt = OBJECT_GET_DATA(bbox, GTK_STOCK_CLOSE);
- window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb);
+ window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb);
- SIGNAL_CONNECT(hs->win, "delete_event", window_delete_event_cb, NULL);
- SIGNAL_CONNECT(hs->win, "destroy", win_destroy_cb, hs);
+ SIGNAL_CONNECT(hs->win, "delete_event", window_delete_event_cb, NULL);
+ SIGNAL_CONNECT(hs->win, "destroy", win_destroy_cb, hs);
gtk_widget_show_all(hs->win);
- window_present(hs->win);
+ window_present(hs->win);
cf_retap_packets(&cfile);
}