forked from osmocom/wireshark
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. svn path=/trunk/; revision=15236
This commit is contained in:
parent
b992c73391
commit
5fb6e97fb4
|
@ -85,7 +85,7 @@ static volatile tap_listener_t *tap_listener_queue=NULL;
|
|||
typedef struct _tap_cmd_arg {
|
||||
struct _tap_cmd_arg *next;
|
||||
const char *cmd;
|
||||
void (*func)(char *arg);
|
||||
void (*func)(const char *arg);
|
||||
} tap_cmd_arg;
|
||||
static tap_cmd_arg *tap_cmd_arg_list=NULL;
|
||||
|
||||
|
@ -117,7 +117,7 @@ tap_init(void)
|
|||
* and initialization routine
|
||||
* ********************************************************************** */
|
||||
void
|
||||
register_tap_listener_cmd_arg(const char *cmd, void (*func)(char *arg))
|
||||
register_tap_listener_cmd_arg(const char *cmd, void (*func)(const char *arg))
|
||||
{
|
||||
tap_cmd_arg *newtca;
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@ typedef void (*tap_draw_cb)(void *tapdata);
|
|||
|
||||
|
||||
extern void tap_init(void);
|
||||
extern void register_tap_listener_cmd_arg(const char *cmd, void (*func)(char *arg));
|
||||
extern void register_tap_listener_cmd_arg(const char *cmd,
|
||||
void (*func)(const char *arg));
|
||||
extern gboolean process_tap_cmd_arg(char *optarg);
|
||||
extern void list_tap_cmd_args(void);
|
||||
extern void start_requested_taps(void);
|
||||
|
|
|
@ -366,11 +366,9 @@ ansi_a_stat_gtk_win_create(
|
|||
*/
|
||||
static void
|
||||
ansi_a_stat_gtk_init(
|
||||
char *optarg)
|
||||
const char *optarg _U_)
|
||||
{
|
||||
/* does not appear to be called */
|
||||
|
||||
optarg = optarg;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -366,11 +366,9 @@ ansi_map_stat_gtk_win_create(
|
|||
*/
|
||||
static void
|
||||
ansi_map_stat_gtk_init(
|
||||
char *optarg)
|
||||
const char *optarg _U_)
|
||||
{
|
||||
/* does not appear to be called */
|
||||
|
||||
optarg = optarg;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -191,10 +191,10 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
/* When called, this function will create a new instance of gtk2-dhcpstat.
|
||||
*/
|
||||
static void
|
||||
dhcpstat_init(char *optarg)
|
||||
dhcpstat_init(const char *optarg)
|
||||
{
|
||||
dhcpstat_t *sp;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
char *title=NULL;
|
||||
GString *error_string;
|
||||
GtkWidget *message_type_fr;
|
||||
|
|
|
@ -184,7 +184,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
/* When called, this function will create a new instance of gtk-dcerpcstat.
|
||||
*/
|
||||
static void
|
||||
gtk_dcerpcstat_init(char *optarg)
|
||||
gtk_dcerpcstat_init(const char *optarg)
|
||||
{
|
||||
rpcstat_t *rs;
|
||||
guint32 i, max_procs;
|
||||
|
@ -201,7 +201,7 @@ gtk_dcerpcstat_init(char *optarg)
|
|||
int major, minor;
|
||||
guint16 ver;
|
||||
int pos=0;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
int hf_opnum;
|
||||
|
||||
|
|
|
@ -128,10 +128,10 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
|
||||
|
||||
static void
|
||||
gtk_fcstat_init(char *optarg)
|
||||
gtk_fcstat_init(const char *optarg)
|
||||
{
|
||||
fcstat_t *fc;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GtkWidget *label;
|
||||
char filter_string[256];
|
||||
GString *error_string;
|
||||
|
|
|
@ -453,11 +453,9 @@ gsm_a_stat_gtk_win_create(
|
|||
*/
|
||||
static void
|
||||
gsm_a_stat_gtk_init(
|
||||
char *optarg)
|
||||
const char *optarg _U_)
|
||||
{
|
||||
/* does not appear to be called */
|
||||
|
||||
optarg = optarg;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -396,11 +396,9 @@ gsm_map_stat_gtk_win_create(
|
|||
*/
|
||||
static void
|
||||
gsm_map_stat_gtk_init(
|
||||
char *optarg)
|
||||
const char *optarg _U_)
|
||||
{
|
||||
/* does not appear to be called */
|
||||
|
||||
optarg = optarg;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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,14 +497,15 @@ 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;
|
||||
|
@ -512,8 +513,7 @@ gtk_h225counter_init(char *optarg)
|
|||
if(strncmp(optarg,"h225,counter,",13) == 0){
|
||||
filter=optarg+13;
|
||||
} else {
|
||||
filter=g_malloc(1);
|
||||
*filter='\0';
|
||||
filter="";
|
||||
}
|
||||
|
||||
hs=g_malloc(sizeof(h225counter_t));
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#include "ui_util.h"
|
||||
|
||||
|
||||
static void gtk_h225rassrt_init(char *optarg);
|
||||
static void gtk_h225rassrt_init(const char *optarg);
|
||||
|
||||
static tap_dfilter_dlg h225_rassrt_dlg = {
|
||||
"H.225 RAS Service Response Time",
|
||||
|
@ -268,7 +268,8 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
}
|
||||
|
||||
|
||||
static const gchar *titles[]={"RAS-Type",
|
||||
static const gchar *titles[]={
|
||||
"RAS-Type",
|
||||
"Measurements",
|
||||
"Min RTT",
|
||||
"Max RTT",
|
||||
|
@ -281,10 +282,10 @@ static const gchar *titles[]={"RAS-Type",
|
|||
"Repeated Responses" };
|
||||
|
||||
static void
|
||||
gtk_h225rassrt_init(char *optarg)
|
||||
gtk_h225rassrt_init(const char *optarg)
|
||||
{
|
||||
h225rassrt_t *hs;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
@ -292,8 +293,7 @@ gtk_h225rassrt_init(char *optarg)
|
|||
if(strncmp(optarg,"h225,srt,",9) == 0){
|
||||
filter=optarg+9;
|
||||
} else {
|
||||
filter=g_malloc(1);
|
||||
*filter='\0';
|
||||
filter="";
|
||||
}
|
||||
|
||||
hs=g_malloc(sizeof(h225rassrt_t));
|
||||
|
|
|
@ -60,7 +60,7 @@ eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
static void
|
||||
gtk_eth_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"hosts,eth,",10)){
|
||||
filter=optarg+10;
|
||||
|
|
|
@ -58,9 +58,9 @@ fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
|
||||
|
||||
static void
|
||||
gtk_fc_hostlist_init(char *optarg)
|
||||
gtk_fc_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"hosts,fc,",9)){
|
||||
filter=optarg+9;
|
||||
|
|
|
@ -58,9 +58,9 @@ fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
|
||||
|
||||
static void
|
||||
gtk_fddi_hostlist_init(char *optarg)
|
||||
gtk_fddi_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"hosts,fddi,",11)){
|
||||
filter=optarg+11;
|
||||
|
|
|
@ -57,9 +57,9 @@ ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
}
|
||||
|
||||
static void
|
||||
gtk_ip_hostlist_init(char *optarg)
|
||||
gtk_ip_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"hosts,ip,",9)){
|
||||
filter=optarg+9;
|
||||
|
|
|
@ -58,9 +58,9 @@ ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons
|
|||
|
||||
|
||||
static void
|
||||
gtk_ipx_hostlist_init(char *optarg)
|
||||
gtk_ipx_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"hosts,ipx,",10)){
|
||||
filter=optarg+10;
|
||||
|
|
|
@ -55,9 +55,9 @@ jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
|
|||
}
|
||||
|
||||
static void
|
||||
gtk_jxta_hostlist_init(char *optarg)
|
||||
gtk_jxta_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"hosts,jxta,",11)){
|
||||
filter=optarg+11;
|
||||
|
|
|
@ -44,7 +44,7 @@ typedef struct _hostlist_talker_t {
|
|||
|
||||
/** Hostlist widget */
|
||||
typedef struct _hostlist_table {
|
||||
char *name; /**< the name of the table */
|
||||
const char *name; /**< the name of the table */
|
||||
GtkWidget *win; /**< GTK window */
|
||||
GtkWidget *page_lb; /**< label */
|
||||
GtkWidget *scrolled_window; /**< the scrolled window */
|
||||
|
|
|
@ -58,9 +58,9 @@ tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co
|
|||
|
||||
|
||||
static void
|
||||
gtk_tcpip_hostlist_init(char *optarg)
|
||||
gtk_tcpip_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"endpoints,tcp,",14)){
|
||||
filter=optarg+14;
|
||||
|
|
|
@ -58,9 +58,9 @@ tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const
|
|||
|
||||
|
||||
static void
|
||||
gtk_tr_hostlist_init(char *optarg)
|
||||
gtk_tr_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"hosts,tr,",9)){
|
||||
filter=optarg+9;
|
||||
|
|
|
@ -58,9 +58,9 @@ udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co
|
|||
|
||||
|
||||
static void
|
||||
gtk_udpip_hostlist_init(char *optarg)
|
||||
gtk_udpip_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"endpoints,udp,",14)){
|
||||
filter=optarg+14;
|
||||
|
|
|
@ -56,9 +56,9 @@ wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
}
|
||||
|
||||
static void
|
||||
gtk_wlan_hostlist_init(char *optarg)
|
||||
gtk_wlan_hostlist_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(!strncmp(optarg,"hosts,wlan,",11)){
|
||||
filter=optarg+11;
|
||||
|
|
|
@ -1048,7 +1048,7 @@ disable_graph(io_stat_graph_t *gio)
|
|||
}
|
||||
|
||||
static void
|
||||
gtk_iostat_init(char *optarg _U_)
|
||||
gtk_iostat_init(const char *optarg _U_)
|
||||
{
|
||||
io_stat_t *io;
|
||||
int i=0;
|
||||
|
|
|
@ -143,10 +143,10 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
|
||||
|
||||
static void
|
||||
gtk_ldapstat_init(char *optarg)
|
||||
gtk_ldapstat_init(const char *optarg)
|
||||
{
|
||||
ldapstat_t *ldap;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GtkWidget *label;
|
||||
char filter_string[256];
|
||||
GString *error_string;
|
||||
|
|
|
@ -658,7 +658,7 @@ register_tap_menu_item(
|
|||
{
|
||||
/*static const char toolspath[] = "/Statistics/";*/
|
||||
const char *toolspath;
|
||||
char *p;
|
||||
const char *p;
|
||||
char *menupath;
|
||||
size_t menupathlen;
|
||||
menu_item_t *child;
|
||||
|
|
|
@ -247,7 +247,8 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
g_free(ms);
|
||||
}
|
||||
|
||||
static gchar *titles[]={"Type",
|
||||
static const gchar *titles[]={
|
||||
"Type",
|
||||
"Messages",
|
||||
"Min SRT",
|
||||
"Max SRT",
|
||||
|
@ -256,10 +257,10 @@ static gchar *titles[]={"Type",
|
|||
"Max in Frame" };
|
||||
|
||||
void
|
||||
gtk_mgcpstat_init(char *optarg)
|
||||
gtk_mgcpstat_init(const char *optarg)
|
||||
{
|
||||
mgcpstat_t *ms;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
GtkWidget *bt_close;
|
||||
GtkWidget *bbox;
|
||||
|
@ -267,8 +268,7 @@ gtk_mgcpstat_init(char *optarg)
|
|||
if(strncmp(optarg,"mgcp,srt,",9) == 0){
|
||||
filter=optarg+9;
|
||||
} else {
|
||||
filter=g_malloc(1);
|
||||
*filter='\0';
|
||||
filter="";
|
||||
}
|
||||
|
||||
ms=g_malloc(sizeof(mgcpstat_t));
|
||||
|
|
|
@ -412,11 +412,9 @@ mtp3_stat_gtk_win_create(
|
|||
*/
|
||||
static void
|
||||
mtp3_stat_gtk_init(
|
||||
char *optarg)
|
||||
const char *optarg _U_)
|
||||
{
|
||||
/* does not appear to be called */
|
||||
|
||||
optarg = optarg;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ win_destroy_cb(void *dummy _U_, gpointer data _U_)
|
|||
/* When called, this function will start rpcprogs
|
||||
*/
|
||||
void
|
||||
gtk_rpcprogs_init(char *optarg _U_)
|
||||
gtk_rpcprogs_init(const char *optarg _U_)
|
||||
{
|
||||
char *title_string;
|
||||
GtkWidget *vbox;
|
||||
|
|
|
@ -215,7 +215,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
/* When called, this function will create a new instance of gtk2-rpcstat.
|
||||
*/
|
||||
static void
|
||||
gtk_rpcstat_init(char *optarg)
|
||||
gtk_rpcstat_init(const char *optarg)
|
||||
{
|
||||
rpcstat_t *rs;
|
||||
guint32 i;
|
||||
|
@ -227,7 +227,7 @@ gtk_rpcstat_init(char *optarg)
|
|||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
int program, version, pos;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
int hf_index;
|
||||
header_field_info *hfi;
|
||||
|
|
|
@ -3641,7 +3641,7 @@ void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_)
|
|||
|
||||
/****************************************************************************/
|
||||
static void
|
||||
rtp_analysis_init(char *dummy _U_)
|
||||
rtp_analysis_init(const char *dummy _U_)
|
||||
{
|
||||
rtp_analysis_cb(NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -407,7 +407,7 @@ const rtpstream_tapinfo_t* rtpstream_get_info(void)
|
|||
|
||||
/****************************************************************************/
|
||||
static void
|
||||
rtpstream_init_tap(char *dummy _U_)
|
||||
rtpstream_init_tap(const char *dummy _U_)
|
||||
{
|
||||
/* XXX: never called? */
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* SCTP chunk counter for ethereal
|
||||
* Copyright 2005 Oleg Terletsky oleg.terletsky@comverse.com
|
||||
*
|
||||
* $Id:$
|
||||
* $Id$
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -55,7 +55,7 @@
|
|||
#include "ui_util.h"
|
||||
|
||||
|
||||
static void sctpstat_init(char *optarg);
|
||||
static void sctpstat_init(const char *optarg);
|
||||
|
||||
static tap_dfilter_dlg sctp_stat_dlg = {
|
||||
"SCTP Statistics",
|
||||
|
@ -263,7 +263,8 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
}
|
||||
|
||||
|
||||
static gchar *titles[]={"Source IP",
|
||||
static const gchar *titles[]={
|
||||
"Source IP",
|
||||
"Source Port",
|
||||
"Dest IP",
|
||||
"Dest Port",
|
||||
|
@ -279,10 +280,10 @@ static gchar *titles[]={"Source IP",
|
|||
"ERROR" };
|
||||
|
||||
static void
|
||||
sctpstat_init(char *optarg)
|
||||
sctpstat_init(const char *optarg)
|
||||
{
|
||||
sctpstat_t *hs;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
@ -290,8 +291,7 @@ sctpstat_init(char *optarg)
|
|||
if(strncmp(optarg,"sctp,stat,",11) == 0){
|
||||
filter=optarg+11;
|
||||
} else {
|
||||
filter=g_malloc(1);
|
||||
*filter='\0';
|
||||
filter="";
|
||||
}
|
||||
|
||||
hs=g_malloc(sizeof(sctpstat_t));
|
||||
|
|
|
@ -1445,7 +1445,7 @@ const sctp_allassocs_info_t* sctp_stat_get_info(void)
|
|||
|
||||
|
||||
static void
|
||||
gtk_sctpstat_init(char *dummy _U_)
|
||||
gtk_sctpstat_init(const char *dummy _U_)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -498,10 +498,10 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
|
||||
/* Create a new instance of gtk_sipstat. */
|
||||
static void
|
||||
gtk_sipstat_init(char *optarg)
|
||||
gtk_sipstat_init(const char *optarg)
|
||||
{
|
||||
sipstat_t *sp;
|
||||
char *filter = NULL;
|
||||
const char *filter = NULL;
|
||||
GString *error_string;
|
||||
char *title = NULL;
|
||||
GtkWidget *main_vb, *separator,
|
||||
|
|
|
@ -150,10 +150,10 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
|
||||
|
||||
static void
|
||||
gtk_smbstat_init(char *optarg)
|
||||
gtk_smbstat_init(const char *optarg)
|
||||
{
|
||||
smbstat_t *ss;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GtkWidget *label;
|
||||
char filter_string[256];
|
||||
GString *error_string;
|
||||
|
|
|
@ -196,7 +196,7 @@ static void free_gtk_tree(GtkWindow *win _U_, stats_tree *st)
|
|||
|
||||
|
||||
/* initializes the stats_tree window */
|
||||
static void init_gtk_tree(char* optarg) {
|
||||
static void init_gtk_tree(const char* optarg) {
|
||||
guint8* abbr = stats_tree_get_abbr(optarg);
|
||||
stats_tree* st = NULL;
|
||||
stats_tree_cfg* cfg = NULL;
|
||||
|
|
|
@ -97,7 +97,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
|
|||
*main_vb, *bbox, *close_bt, *help_bt;
|
||||
GtkWidget *table;
|
||||
GtkWidget *list;
|
||||
char *titles[] = { "Traffic", "Captured", "Displayed" };
|
||||
static const char *titles[] = { "Traffic", "Captured", "Displayed" };
|
||||
|
||||
gchar string_buff[SUM_STR_MAX];
|
||||
gchar string_buff2[SUM_STR_MAX];
|
||||
|
|
|
@ -160,7 +160,7 @@ static GtkWidget *color_display_button, *prefs_button, *help_button;
|
|||
#if GTK_MAJOR_VERSION >= 2
|
||||
typedef struct stock_pixmap_tag{
|
||||
const char * name;
|
||||
char ** xpm_data;
|
||||
const char ** xpm_data;
|
||||
} stock_pixmap_t;
|
||||
|
||||
/* generate application specific stock items */
|
||||
|
|
|
@ -741,7 +741,7 @@ void voip_calls_dlg_reset(void *ptr _U_)
|
|||
|
||||
/* init function for tap */
|
||||
static void
|
||||
voip_calls_init_tap(char *dummy _U_)
|
||||
voip_calls_init_tap(const char *dummy _U_)
|
||||
{
|
||||
gint c;
|
||||
gchar *data[NUM_COLS];
|
||||
|
|
|
@ -304,10 +304,10 @@ wsp_init_table(wspstat_t *sp)
|
|||
/* When called, this function will create a new instance of gtk2-wspstat.
|
||||
*/
|
||||
static void
|
||||
gtk_wspstat_init(char *optarg)
|
||||
gtk_wspstat_init(const char *optarg)
|
||||
{
|
||||
wspstat_t *sp;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
char *title=NULL;
|
||||
GString *error_string;
|
||||
GtkWidget *main_vb, *pdutypes_fr, *statuscode_fr ;
|
||||
|
|
|
@ -134,14 +134,11 @@ ansi_a_stat_draw(
|
|||
|
||||
|
||||
static void
|
||||
ansi_a_stat_init(char *optarg)
|
||||
ansi_a_stat_init(const char *optarg _U_)
|
||||
{
|
||||
ansi_a_stat_t *stat_p;
|
||||
GString *err_p;
|
||||
|
||||
|
||||
optarg = optarg;
|
||||
|
||||
stat_p = g_malloc(sizeof(ansi_a_stat_t));
|
||||
|
||||
memset(stat_p, 0, sizeof(ansi_a_stat_t));
|
||||
|
|
|
@ -136,10 +136,10 @@ dhcpstat_draw(void *psp)
|
|||
/* When called, this function will create a new instance of tap-boopstat.
|
||||
*/
|
||||
static void
|
||||
dhcpstat_init(char *optarg)
|
||||
dhcpstat_init(const char *optarg)
|
||||
{
|
||||
dhcpstat_t *sp;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if (!strncmp (optarg, "bootp,stat,", 11)){
|
||||
|
|
|
@ -186,7 +186,7 @@ dcerpcstat_draw(void *prs)
|
|||
|
||||
|
||||
static void
|
||||
dcerpcstat_init(char *optarg)
|
||||
dcerpcstat_init(const char *optarg)
|
||||
{
|
||||
rpcstat_t *rs;
|
||||
guint32 i, max_procs;
|
||||
|
@ -196,7 +196,7 @@ dcerpcstat_init(char *optarg)
|
|||
int major, minor;
|
||||
guint16 ver;
|
||||
int pos=0;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
/*
|
||||
|
|
|
@ -269,14 +269,11 @@ gsm_a_stat_draw(
|
|||
|
||||
|
||||
static void
|
||||
gsm_a_stat_init(char *optarg)
|
||||
gsm_a_stat_init(const char *optarg _U_)
|
||||
{
|
||||
gsm_a_stat_t *stat_p;
|
||||
GString *err_p;
|
||||
|
||||
|
||||
optarg = optarg;
|
||||
|
||||
stat_p = g_malloc(sizeof(gsm_a_stat_t));
|
||||
|
||||
memset(stat_p, 0, sizeof(gsm_a_stat_t));
|
||||
|
|
|
@ -387,17 +387,16 @@ h225counter_draw(void *phs)
|
|||
|
||||
|
||||
static void
|
||||
h225counter_init(char *optarg)
|
||||
h225counter_init(const char *optarg)
|
||||
{
|
||||
h225counter_t *hs;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if(!strncmp(optarg,"h225,counter,",13)){
|
||||
filter=optarg+13;
|
||||
} else {
|
||||
filter=g_malloc(1);
|
||||
*filter='\0';
|
||||
filter="";
|
||||
}
|
||||
|
||||
hs = g_malloc(sizeof(h225counter_t));
|
||||
|
|
|
@ -211,17 +211,16 @@ h225rassrt_draw(void *phs)
|
|||
|
||||
|
||||
static void
|
||||
h225rassrt_init(char *optarg)
|
||||
h225rassrt_init(const char *optarg)
|
||||
{
|
||||
h225rassrt_t *hs;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if(!strncmp(optarg,"h225,srt,",9)){
|
||||
filter=optarg+9;
|
||||
} else {
|
||||
filter=g_malloc(1);
|
||||
*filter='\0';
|
||||
filter="";
|
||||
}
|
||||
|
||||
hs = g_malloc(sizeof(h225rassrt_t));
|
||||
|
|
|
@ -280,10 +280,10 @@ httpstat_draw(void *psp )
|
|||
/* When called, this function will create a new instance of gtk_httpstat.
|
||||
*/
|
||||
static void
|
||||
gtk_httpstat_init(char *optarg)
|
||||
gtk_httpstat_init(const char *optarg)
|
||||
{
|
||||
httpstat_t *sp;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if (!strncmp (optarg, "http,stat,", 10)){
|
||||
|
|
|
@ -575,13 +575,13 @@ CALC_TYPE_AVG 5
|
|||
}
|
||||
|
||||
void
|
||||
iostat_init(char *optarg)
|
||||
iostat_init(const char *optarg)
|
||||
{
|
||||
float interval_float;
|
||||
gint32 interval;
|
||||
int pos=0;
|
||||
io_stat_t *io;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
|
||||
if(sscanf(optarg,"io,stat,%f,%n",&interval_float,&pos)==1){
|
||||
if(pos){
|
||||
|
@ -611,7 +611,8 @@ iostat_init(char *optarg)
|
|||
|
||||
register_io_tap(io, 0, NULL);
|
||||
} else {
|
||||
char *str,*pos,*tmp;
|
||||
const char *str,*pos;
|
||||
char *tmp;
|
||||
int i;
|
||||
/* find how many ',' separated filters we have */
|
||||
str=filter;
|
||||
|
|
|
@ -579,9 +579,9 @@ iousers_draw(void *arg)
|
|||
}
|
||||
|
||||
void
|
||||
iousers_init(char *optarg)
|
||||
iousers_init(const char *optarg)
|
||||
{
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
const char *tap_type, *tap_type_name;
|
||||
tap_packet_cb packet_func;
|
||||
io_users_t *iu=NULL;
|
||||
|
|
|
@ -181,18 +181,17 @@ mgcpstat_draw(void *pms)
|
|||
|
||||
|
||||
static void
|
||||
mgcpstat_init(char *optarg)
|
||||
mgcpstat_init(const char *optarg)
|
||||
{
|
||||
mgcpstat_t *ms;
|
||||
int i;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if(!strncmp(optarg,"mgcp,rtd,",9)){
|
||||
filter=optarg+9;
|
||||
} else {
|
||||
filter=g_malloc(1);
|
||||
*filter='\0';
|
||||
filter="";
|
||||
}
|
||||
|
||||
ms=g_malloc(sizeof(mgcpstat_t));
|
||||
|
|
|
@ -87,11 +87,11 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo
|
|||
|
||||
|
||||
static void
|
||||
protocolinfo_init(char *optarg)
|
||||
protocolinfo_init(const char *optarg)
|
||||
{
|
||||
pci_t *rs;
|
||||
char *field=NULL;
|
||||
char *filter=NULL;
|
||||
const char *field=NULL;
|
||||
const char *filter=NULL;
|
||||
header_field_info *hfi;
|
||||
GString *error_string;
|
||||
|
||||
|
|
|
@ -166,11 +166,11 @@ protohierstat_draw(void *prs)
|
|||
|
||||
|
||||
static void
|
||||
protohierstat_init(char *optarg)
|
||||
protohierstat_init(const char *optarg)
|
||||
{
|
||||
phs_t *rs;
|
||||
int pos=0;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if(!strcmp("io,phs",optarg)){
|
||||
|
|
|
@ -220,7 +220,7 @@ rpcprogs_draw(void *dummy _U_)
|
|||
|
||||
|
||||
static void
|
||||
rpcprogs_init(char *optarg _U_)
|
||||
rpcprogs_init(const char *optarg _U_)
|
||||
{
|
||||
GString *error_string;
|
||||
|
||||
|
|
|
@ -277,13 +277,13 @@ rpcstat_find_procs(gpointer *key, gpointer *value _U_, gpointer *user_data _U_)
|
|||
* new instance for the rpc tap.
|
||||
*/
|
||||
static void
|
||||
rpcstat_init(char *optarg)
|
||||
rpcstat_init(const char *optarg)
|
||||
{
|
||||
rpcstat_t *rs;
|
||||
guint32 i;
|
||||
int program, version;
|
||||
int pos=0;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if(sscanf(optarg,"rpc,rtt,%d,%d,%n",&program,&version,&pos)==2){
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* SCTP chunk counter for ethereal
|
||||
* Copyright 2005 Oleg Terletsky <oleg.terletsky@comverse.com>
|
||||
*
|
||||
* $Id:$
|
||||
* $Id$
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -219,17 +219,16 @@ sctpstat_draw(void *phs)
|
|||
|
||||
|
||||
static void
|
||||
sctpstat_init(char *optarg)
|
||||
sctpstat_init(const char *optarg)
|
||||
{
|
||||
sctpstat_t *hs;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if(!strncmp(optarg,"sctp,stat,",11)){
|
||||
filter=optarg+11;
|
||||
} else {
|
||||
filter=g_malloc(1);
|
||||
*filter='\0';
|
||||
filter="";
|
||||
}
|
||||
|
||||
hs = g_malloc(sizeof(sctpstat_t));
|
||||
|
|
|
@ -344,10 +344,10 @@ sipstat_draw(void *psp )
|
|||
}
|
||||
|
||||
static void
|
||||
sipstat_init(char *optarg)
|
||||
sipstat_init(const char *optarg)
|
||||
{
|
||||
sipstat_t *sp;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if (strncmp (optarg, "sip,stat,", 9) == 0){
|
||||
|
|
|
@ -68,7 +68,7 @@ smbsids_draw(void *pss _U_)
|
|||
|
||||
|
||||
static void
|
||||
smbsids_init(char *optarg _U_)
|
||||
smbsids_init(const char *optarg _U_)
|
||||
{
|
||||
GString *error_string;
|
||||
|
||||
|
|
|
@ -209,11 +209,11 @@ smbstat_draw(void *pss)
|
|||
|
||||
|
||||
static void
|
||||
smbstat_init(char *optarg)
|
||||
smbstat_init(const char *optarg)
|
||||
{
|
||||
smbstat_t *ss;
|
||||
guint32 i;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
GString *error_string;
|
||||
|
||||
if(!strncmp(optarg,"smb,rtt,",8)){
|
||||
|
|
|
@ -67,7 +67,7 @@ static void draw_stats_tree(void *psp) {
|
|||
|
||||
}
|
||||
|
||||
static void init_stats_tree(char *optarg) {
|
||||
static void init_stats_tree(const char *optarg) {
|
||||
guint8* abbr = stats_tree_get_abbr(optarg);
|
||||
GString *error_string;
|
||||
stats_tree_cfg *cfg = NULL;
|
||||
|
|
|
@ -213,10 +213,10 @@ wspstat_draw(void *psp)
|
|||
* new instance for the wsp tap.
|
||||
*/
|
||||
static void
|
||||
wspstat_init(char *optarg)
|
||||
wspstat_init(const char *optarg)
|
||||
{
|
||||
wspstat_t *sp;
|
||||
char *filter=NULL;
|
||||
const char *filter=NULL;
|
||||
guint32 i;
|
||||
GString *error_string;
|
||||
wsp_status_code_t *sc;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
typedef struct _tap_dfilter_dlg {
|
||||
const char *win_title; /* title */
|
||||
const char *init_string; /* the string to call the tap without a filter via "-z" option */
|
||||
void (* tap_init_cb)(char *); /* callback to init function of the tap */
|
||||
void (* tap_init_cb)(const char *); /* callback to init function of the tap */
|
||||
gint index; /* initiate this value always with "-1" */
|
||||
} tap_dfilter_dlg;
|
||||
|
||||
|
|
Loading…
Reference in New Issue