forked from osmocom/wireshark
Fix [-Wshadow] warnings.
svn path=/trunk/; revision=46426
This commit is contained in:
parent
35b912bcbf
commit
ae68f42297
|
@ -767,10 +767,10 @@ followArgRange(
|
|||
|
||||
static void
|
||||
followArgDone(
|
||||
const char * optarg
|
||||
const char * optargp
|
||||
)
|
||||
{
|
||||
if (*optarg != 0)
|
||||
if (*optargp != 0)
|
||||
{
|
||||
followExit("Invalid parameter.");
|
||||
}
|
||||
|
@ -778,21 +778,21 @@ followArgDone(
|
|||
|
||||
static void
|
||||
followTcp(
|
||||
const char * optarg,
|
||||
const char * optargp,
|
||||
void * userdata _U_
|
||||
)
|
||||
{
|
||||
follow_t * fp;
|
||||
GString * errp;
|
||||
|
||||
optarg += strlen(STR_FOLLOW_TCP);
|
||||
optargp += strlen(STR_FOLLOW_TCP);
|
||||
|
||||
fp = followAlloc(type_TCP);
|
||||
|
||||
followArgMode(&optarg, fp);
|
||||
followArgFilter(&optarg, fp);
|
||||
followArgRange(&optarg, fp);
|
||||
followArgDone(optarg);
|
||||
followArgMode(&optargp, fp);
|
||||
followArgFilter(&optargp, fp);
|
||||
followArgRange(&optargp, fp);
|
||||
followArgDone(optargp);
|
||||
|
||||
reset_tcp_reassembly();
|
||||
if (fp->index != G_MAXUINT32)
|
||||
|
@ -825,21 +825,21 @@ followTcp(
|
|||
|
||||
static void
|
||||
followUdp(
|
||||
const char * optarg,
|
||||
const char * optargp,
|
||||
void * userdata _U_
|
||||
)
|
||||
{
|
||||
follow_t * fp;
|
||||
GString * errp;
|
||||
|
||||
optarg += strlen(STR_FOLLOW_UDP);
|
||||
optargp += strlen(STR_FOLLOW_UDP);
|
||||
|
||||
fp = followAlloc(type_UDP);
|
||||
|
||||
followArgMode(&optarg, fp);
|
||||
followArgFilter(&optarg, fp);
|
||||
followArgRange(&optarg, fp);
|
||||
followArgDone(optarg);
|
||||
followArgMode(&optargp, fp);
|
||||
followArgFilter(&optargp, fp);
|
||||
followArgRange(&optargp, fp);
|
||||
followArgDone(optargp);
|
||||
|
||||
if (fp->index != G_MAXUINT32)
|
||||
{
|
||||
|
|
|
@ -1192,7 +1192,7 @@ insert_new_rows(GList *list)
|
|||
GString *ip_str;
|
||||
GtkTreeView *if_cb;
|
||||
GtkTreeModel *model;
|
||||
link_row *link = NULL;
|
||||
link_row *linkr = NULL;
|
||||
|
||||
if_cb = (GtkTreeView *) g_object_get_data(G_OBJECT(cap_open_w), E_CAP_IFACE_KEY);
|
||||
model = gtk_tree_view_get_model(if_cb);
|
||||
|
@ -1277,21 +1277,21 @@ insert_new_rows(GList *list)
|
|||
#endif
|
||||
for (lt_entry = caps->data_link_types; lt_entry != NULL; lt_entry = g_list_next(lt_entry)) {
|
||||
data_link_info = (data_link_info_t *)lt_entry->data;
|
||||
link = (link_row *)g_malloc(sizeof(link_row));
|
||||
linkr = (link_row *)g_malloc(sizeof(link_row));
|
||||
if (data_link_info->description != NULL) {
|
||||
str = g_strdup_printf("%s", data_link_info->description);
|
||||
link->dlt = data_link_info->dlt;
|
||||
linkr->dlt = data_link_info->dlt;
|
||||
} else {
|
||||
str = g_strdup_printf("%s (not supported)", data_link_info->name);
|
||||
link->dlt = -1;
|
||||
linkr->dlt = -1;
|
||||
}
|
||||
if (linktype_count == 0) {
|
||||
link_type_name = g_strdup(str);
|
||||
device.active_dlt = data_link_info->dlt;
|
||||
}
|
||||
link->name = g_strdup(str);
|
||||
linkr->name = g_strdup(str);
|
||||
g_free(str);
|
||||
device.links = g_list_append(device.links, link);
|
||||
device.links = g_list_append(device.links, linkr);
|
||||
linktype_count++;
|
||||
} /* for link_types */
|
||||
} else {
|
||||
|
@ -1337,11 +1337,11 @@ insert_new_rows(GList *list)
|
|||
}
|
||||
|
||||
#if defined(HAVE_PCAP_CREATE)
|
||||
gtk_list_store_set (GTK_LIST_STORE(model), &iter, CAPTURE, FALSE, IFACE_HIDDEN_NAME, device.name, INTERFACE, temp, LINK, link_type_name, PMODE, (device.pmode?"enabled":"disabled"), SNAPLEN, snaplen_string, BUFFER, (guint) global_capture_opts.default_options.buffer_size, MONITOR, "no",FILTER, "",-1);
|
||||
gtk_list_store_set (GTK_LIST_STORE(model), &iter, CAPTURE, FALSE, IFACE_HIDDEN_NAME, device.name, INTERFACE, temp, LINK, linkr_type_name, PMODE, (device.pmode?"enabled":"disabled"), SNAPLEN, snaplen_string, BUFFER, (guint) global_capture_opts.default_options.buffer_size, MONITOR, "no",FILTER, "",-1);
|
||||
#elif defined(_WIN32) && !defined(HAVE_PCAP_CREATE)
|
||||
gtk_list_store_set (GTK_LIST_STORE(model), &iter, CAPTURE, FALSE, IFACE_HIDDEN_NAME, device.name, INTERFACE, temp, LINK, link_type_name, PMODE, (device.pmode?"enabled":"disabled"), SNAPLEN, snaplen_string, BUFFER, (guint) global_capture_opts.default_options.buffer_size, FILTER, "",-1);
|
||||
gtk_list_store_set (GTK_LIST_STORE(model), &iter, CAPTURE, FALSE, IFACE_HIDDEN_NAME, device.name, INTERFACE, temp, LINK, linkr_type_name, PMODE, (device.pmode?"enabled":"disabled"), SNAPLEN, snaplen_string, BUFFER, (guint) global_capture_opts.default_options.buffer_size, FILTER, "",-1);
|
||||
#else
|
||||
gtk_list_store_set (GTK_LIST_STORE(model), &iter, CAPTURE, FALSE, IFACE_HIDDEN_NAME, device.name, INTERFACE, temp, LINK, link_type_name, PMODE, (device.pmode?"enabled":"disabled"), SNAPLEN, snaplen_string, -1);
|
||||
gtk_list_store_set (GTK_LIST_STORE(model), &iter, CAPTURE, FALSE, IFACE_HIDDEN_NAME, device.name, INTERFACE, temp, LINK, linkr_type_name, PMODE, (device.pmode?"enabled":"disabled"), SNAPLEN, snaplen_string, -1);
|
||||
#endif
|
||||
g_string_free(ip_str, TRUE);
|
||||
#ifdef HAVE_PCAP_REMOTE
|
||||
|
@ -2349,7 +2349,7 @@ update_options_table(gint indx)
|
|||
GtkTreeIter iter;
|
||||
gchar *temp, *path_str, *snaplen_string, *linkname = "";
|
||||
GList *list;
|
||||
link_row *link = NULL;
|
||||
link_row *linkr = NULL;
|
||||
gboolean enabled;
|
||||
|
||||
device = g_array_index(global_capture_opts.all_ifaces, interface_t, marked_interface);
|
||||
|
@ -2362,9 +2362,9 @@ update_options_table(gint indx)
|
|||
}
|
||||
for (list=device.links; list!=NULL; list=g_list_next(list))
|
||||
{
|
||||
link = (link_row*)(list->data);
|
||||
linkname = g_strdup(link->name);
|
||||
if (link->dlt == device.active_dlt) {
|
||||
linkr = (link_row*)(list->data);
|
||||
linkname = g_strdup(linkr->name);
|
||||
if (linkr->dlt == device.active_dlt) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5366,7 +5366,7 @@ create_and_fill_model(GtkTreeView *view)
|
|||
GList *list;
|
||||
char *temp = "", *snaplen_string, *linkname="";
|
||||
guint i;
|
||||
link_row *link = NULL;
|
||||
link_row *linkr = NULL;
|
||||
interface_t device;
|
||||
|
||||
#if defined(HAVE_PCAP_CREATE)
|
||||
|
@ -5386,9 +5386,9 @@ create_and_fill_model(GtkTreeView *view)
|
|||
temp = g_strdup_printf("<b>%s</b>\n<span size='small'>%s</span>", device.display_name, device.addresses);
|
||||
}
|
||||
for (list = device.links; list != NULL; list = g_list_next(list)) {
|
||||
link = (link_row*)(list->data);
|
||||
linkname = g_strdup(link->name);
|
||||
if (link->dlt == device.active_dlt) {
|
||||
linkr = (link_row*)(list->data);
|
||||
linkname = g_strdup(linkr->name);
|
||||
if (linkr->dlt == device.active_dlt) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5561,7 +5561,7 @@ capture_prep_monitor_changed_cb(GtkWidget *monitor, gpointer argp _U_)
|
|||
gint linktype_count = 0, i;
|
||||
data_link_info_t *data_link_info;
|
||||
interface_t device;
|
||||
link_row *link;
|
||||
link_row *linkr;
|
||||
GtkWidget *linktype_combo_box = (GtkWidget *) g_object_get_data(G_OBJECT(opt_edit_w), E_CAP_LT_CBX_KEY);
|
||||
GtkWidget *linktype_lb = (GtkWidget *)g_object_get_data(G_OBJECT(linktype_combo_box), E_CAP_LT_CBX_LABEL_KEY);
|
||||
|
||||
|
@ -5586,17 +5586,17 @@ capture_prep_monitor_changed_cb(GtkWidget *monitor, gpointer argp _U_)
|
|||
device.monitor_mode_supported = caps->can_set_rfmon;
|
||||
device.monitor_mode_enabled = monitor_mode;
|
||||
for (lt_entry = caps->data_link_types; lt_entry != NULL; lt_entry = g_list_next(lt_entry)) {
|
||||
link = (link_row *)g_malloc(sizeof(link_row));
|
||||
linkr = (link_row *)g_malloc(sizeof(link_row));
|
||||
data_link_info = (data_link_info_t *)lt_entry->data;
|
||||
if (data_link_info->description != NULL) {
|
||||
ws_combo_box_append_text_and_pointer(GTK_COMBO_BOX(linktype_combo_box),
|
||||
data_link_info->description,
|
||||
GINT_TO_POINTER(data_link_info->dlt));
|
||||
link->dlt = data_link_info->dlt;
|
||||
linkr->dlt = data_link_info->dlt;
|
||||
if (linktype_count == 0) {
|
||||
device.active_dlt = data_link_info->dlt;
|
||||
}
|
||||
link->name = g_strdup(data_link_info->description);
|
||||
linkr->name = g_strdup(data_link_info->description);
|
||||
} else {
|
||||
gchar *str;
|
||||
/* Not supported - tell them about it but don't let them select it. */
|
||||
|
@ -5606,11 +5606,11 @@ capture_prep_monitor_changed_cb(GtkWidget *monitor, gpointer argp _U_)
|
|||
str,
|
||||
GINT_TO_POINTER(-1), /* Flag as "not supported" */
|
||||
FALSE);
|
||||
link->dlt = -1;
|
||||
link->name = g_strdup(str);
|
||||
linkr->dlt = -1;
|
||||
linkr->name = g_strdup(str);
|
||||
g_free(str);
|
||||
}
|
||||
device.links = g_list_append(device.links, link);
|
||||
device.links = g_list_append(device.links, linkr);
|
||||
linktype_count++;
|
||||
}
|
||||
free_if_capabilities(caps);
|
||||
|
|
|
@ -995,7 +995,7 @@ static void win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
|
||||
|
||||
/* Create a new MAC LTE stats dialog */
|
||||
static void gtk_mac_lte_stat_init(const char *optarg, void *userdata _U_)
|
||||
static void gtk_mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
mac_lte_stat_t *hs;
|
||||
const char *filter = NULL;
|
||||
|
@ -1032,9 +1032,9 @@ static void gtk_mac_lte_stat_init(const char *optarg, void *userdata _U_)
|
|||
gint i, n;
|
||||
|
||||
/* Check for a filter string */
|
||||
if (strncmp(optarg, "mac-lte,stat,", 13) == 0) {
|
||||
if (strncmp(opt_arg, "mac-lte,stat,", 13) == 0) {
|
||||
/* Skip those characters from filter to display */
|
||||
filter = optarg + 13;
|
||||
filter = opt_arg + 13;
|
||||
}
|
||||
else {
|
||||
/* No filter */
|
||||
|
|
|
@ -137,7 +137,7 @@ static const stat_column titles[]={
|
|||
};
|
||||
|
||||
static void
|
||||
gtk_megacostat_init(const char *optarg, void *userdata _U_)
|
||||
gtk_megacostat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
megacostat_t *ms;
|
||||
GString *error_string;
|
||||
|
@ -160,8 +160,8 @@ gtk_megacostat_init(const char *optarg, void *userdata _U_)
|
|||
|
||||
ms=g_malloc(sizeof(megacostat_t));
|
||||
|
||||
if(strncmp(optarg,"megaco,srt,",11) == 0){
|
||||
ms->filter=g_strdup(optarg+11);
|
||||
if(strncmp(opt_arg,"megaco,srt,",11) == 0){
|
||||
ms->filter=g_strdup(opt_arg+11);
|
||||
} else {
|
||||
ms->filter=NULL;
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ static const stat_column titles[]={
|
|||
};
|
||||
|
||||
static void
|
||||
gtk_mgcpstat_init(const char *optarg, void *userdata _U_)
|
||||
gtk_mgcpstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
mgcpstat_t *ms;
|
||||
GString *error_string;
|
||||
|
@ -247,8 +247,8 @@ gtk_mgcpstat_init(const char *optarg, void *userdata _U_)
|
|||
|
||||
ms=g_malloc(sizeof(mgcpstat_t));
|
||||
|
||||
if(strncmp(optarg,"mgcp,srt,",9) == 0){
|
||||
ms->filter=g_strdup(optarg+9);
|
||||
if(strncmp(opt_arg,"mgcp,srt,",9) == 0){
|
||||
ms->filter=g_strdup(opt_arg+9);
|
||||
} else {
|
||||
ms->filter=NULL;
|
||||
}
|
||||
|
|
|
@ -412,7 +412,7 @@ void mtp3_stat_gtk_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
|
||||
|
||||
static void
|
||||
mtp3_stat_gtk_init( const char *optarg _U_, void* userdata _U_)
|
||||
mtp3_stat_gtk_init( const char *opt_arg _U_, void* userdata _U_)
|
||||
{
|
||||
mtp3_stat_gtk_cb(NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -481,7 +481,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
|
||||
|
||||
static void
|
||||
gtk_ncpstat_init(const char *optarg, void *userdata _U_)
|
||||
gtk_ncpstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
ncpstat_t *ss;
|
||||
const char *filter=NULL;
|
||||
|
@ -494,8 +494,8 @@ gtk_ncpstat_init(const char *optarg, void *userdata _U_)
|
|||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
||||
if(!strncmp(optarg,"ncp,srt,",8)){
|
||||
filter=optarg+8;
|
||||
if(!strncmp(opt_arg,"ncp,srt,",8)){
|
||||
filter=opt_arg+8;
|
||||
} else {
|
||||
filter=NULL;
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ static const stat_column titles[]={
|
|||
};
|
||||
|
||||
static void
|
||||
gtk_radiusstat_init(const char *optarg, void *userdata _U_)
|
||||
gtk_radiusstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
radiusstat_t *rs;
|
||||
GString *error_string;
|
||||
|
@ -317,8 +317,8 @@ gtk_radiusstat_init(const char *optarg, void *userdata _U_)
|
|||
|
||||
rs=g_malloc(sizeof(radiusstat_t));
|
||||
|
||||
if(strncmp(optarg,"radius,srt,",11) == 0){
|
||||
rs->filter=g_strdup(optarg+11);
|
||||
if(strncmp(opt_arg,"radius,srt,",11) == 0){
|
||||
rs->filter=g_strdup(opt_arg+11);
|
||||
} else {
|
||||
rs->filter=NULL;
|
||||
}
|
||||
|
|
|
@ -1248,7 +1248,7 @@ static void dl_graph_clicked(GtkWidget *win _U_, rlc_lte_stat_t* hs)
|
|||
|
||||
|
||||
/* Create a new RLC LTE stats dialog */
|
||||
static void gtk_rlc_lte_stat_init(const char *optarg, void *userdata _U_)
|
||||
static void gtk_rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
rlc_lte_stat_t *hs;
|
||||
const char *filter = NULL;
|
||||
|
@ -1284,9 +1284,9 @@ static void gtk_rlc_lte_stat_init(const char *optarg, void *userdata _U_)
|
|||
gint i;
|
||||
|
||||
/* Check for a filter string */
|
||||
if (strncmp(optarg, "rlc-lte,stat,", 13) == 0) {
|
||||
if (strncmp(opt_arg, "rlc-lte,stat,", 13) == 0) {
|
||||
/* Skip those characters from filter to display */
|
||||
filter = optarg + 13;
|
||||
filter = opt_arg + 13;
|
||||
}
|
||||
else {
|
||||
/* No filter */
|
||||
|
|
|
@ -358,7 +358,7 @@ win_destroy_cb(void *dummy _U_, gpointer data _U_)
|
|||
/* When called, this function will start rpcprogs
|
||||
*/
|
||||
static void
|
||||
gtk_rpcprogs_init(const char *optarg _U_, void* userdata _U_)
|
||||
gtk_rpcprogs_init(const char *opt_arg _U_, void* userdata _U_)
|
||||
{
|
||||
char *title_string;
|
||||
GtkWidget *vbox;
|
||||
|
|
|
@ -212,7 +212,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(const char *optarg, void* userdata _U_)
|
||||
gtk_rpcstat_init(const char *opt_arg, void* userdata _U_)
|
||||
{
|
||||
rpcstat_t *rs;
|
||||
guint32 i;
|
||||
|
@ -230,9 +230,9 @@ gtk_rpcstat_init(const char *optarg, void* userdata _U_)
|
|||
header_field_info *hfi;
|
||||
|
||||
pos=0;
|
||||
if(sscanf(optarg,"rpc,srt,%d,%d,%n",&program,&version,&pos)==2){
|
||||
if(sscanf(opt_arg,"rpc,srt,%d,%d,%n",&program,&version,&pos)==2){
|
||||
if(pos){
|
||||
filter=optarg+pos;
|
||||
filter=opt_arg+pos;
|
||||
} else {
|
||||
filter=NULL;
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
/* When called, this function will create a new instance of gtk2-scsistat.
|
||||
*/
|
||||
static void
|
||||
gtk_scsistat_init(const char *optarg, void* userdata _U_)
|
||||
gtk_scsistat_init(const char *opt_arg, void* userdata _U_)
|
||||
{
|
||||
scsistat_t *rs;
|
||||
guint32 i;
|
||||
|
@ -174,9 +174,9 @@ gtk_scsistat_init(const char *optarg, void* userdata _U_)
|
|||
const char *hf_name=NULL;
|
||||
|
||||
pos=0;
|
||||
if(sscanf(optarg,"scsi,srt,%d,%n",&program,&pos)==1){
|
||||
if(sscanf(opt_arg,"scsi,srt,%d,%n",&program,&pos)==1){
|
||||
if(pos){
|
||||
filter=optarg+pos;
|
||||
filter=opt_arg+pos;
|
||||
} else {
|
||||
filter=NULL;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "ui/gtk/sctp_stat.h"
|
||||
|
||||
|
||||
static void sctpstat_init(const char *optarg, void *userdata);
|
||||
static void sctpstat_init(const char *opt_arg, void *userdata);
|
||||
|
||||
static tap_param sctp_stat_params[] = {
|
||||
{ PARAM_FILTER, "Filter", NULL }
|
||||
|
@ -259,7 +259,7 @@ static const stat_column titles[]={
|
|||
};
|
||||
|
||||
static void
|
||||
sctpstat_init(const char *optarg, void *userdata _U_)
|
||||
sctpstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
sctpstat_t *hs;
|
||||
GString *error_string;
|
||||
|
@ -267,8 +267,8 @@ sctpstat_init(const char *optarg, void *userdata _U_)
|
|||
GtkWidget *close_bt;
|
||||
|
||||
hs=g_malloc(sizeof(sctpstat_t));
|
||||
if(strncmp(optarg,"sctp,stat,",10) == 0){
|
||||
hs->filter=g_strdup(optarg+10);
|
||||
if(strncmp(opt_arg,"sctp,stat,",10) == 0){
|
||||
hs->filter=g_strdup(opt_arg+10);
|
||||
} else {
|
||||
hs->filter=NULL;
|
||||
}
|
||||
|
|
|
@ -553,7 +553,7 @@ init_table(GtkWidget *main_vb, gchar *title, tbl_info_t *tbl_info)
|
|||
|
||||
/* Create a new instance of gtk_sipstat. */
|
||||
static void
|
||||
gtk_sipstat_init(const char *optarg, void *userdata _U_)
|
||||
gtk_sipstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
sipstat_t *sp;
|
||||
const char *filter;
|
||||
|
@ -564,10 +564,10 @@ gtk_sipstat_init(const char *optarg, void *userdata _U_)
|
|||
GtkWidget *bbox;
|
||||
|
||||
|
||||
if (strncmp(optarg, "sip,stat,", 9) == 0)
|
||||
if (strncmp(opt_arg, "sip,stat,", 9) == 0)
|
||||
{
|
||||
/* Skip those characters from filter to display */
|
||||
filter = optarg + 9;
|
||||
filter = opt_arg + 9;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -114,7 +114,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
|
||||
|
||||
static void
|
||||
gtk_smb2stat_init(const char *optarg, void *userdata _U_)
|
||||
gtk_smb2stat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
smb2stat_t *ss;
|
||||
const char *filter=NULL;
|
||||
|
@ -126,8 +126,8 @@ gtk_smb2stat_init(const char *optarg, void *userdata _U_)
|
|||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
||||
if(!strncmp(optarg,"smb2,srt,",9)){
|
||||
filter=optarg+9;
|
||||
if(!strncmp(opt_arg,"smb2,srt,",9)){
|
||||
filter=opt_arg+9;
|
||||
} else {
|
||||
filter=NULL;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
|
|||
|
||||
|
||||
static void
|
||||
gtk_smbstat_init(const char *optarg, void *userdata _U_)
|
||||
gtk_smbstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
smbstat_t *ss;
|
||||
const char *filter=NULL;
|
||||
|
@ -148,8 +148,8 @@ gtk_smbstat_init(const char *optarg, void *userdata _U_)
|
|||
GtkWidget *bbox;
|
||||
GtkWidget *close_bt;
|
||||
|
||||
if(!strncmp(optarg,"smb,srt,",8)){
|
||||
filter=optarg+8;
|
||||
if(!strncmp(opt_arg,"smb,srt,",8)){
|
||||
filter=opt_arg+8;
|
||||
} else {
|
||||
filter=NULL;
|
||||
}
|
||||
|
|
|
@ -177,9 +177,9 @@ reset_tap(void* p)
|
|||
|
||||
/* initializes the stats_tree window */
|
||||
static void
|
||||
init_gtk_tree(const char* optarg, void *userdata _U_)
|
||||
init_gtk_tree(const char* opt_arg, void *userdata _U_)
|
||||
{
|
||||
gchar *abbr = stats_tree_get_abbr(optarg);
|
||||
gchar *abbr = stats_tree_get_abbr(opt_arg);
|
||||
stats_tree* st = NULL;
|
||||
stats_tree_cfg* cfg = NULL;
|
||||
tree_pres* pr = g_malloc(sizeof(tree_pres));
|
||||
|
@ -204,11 +204,11 @@ init_gtk_tree(const char* optarg, void *userdata _U_)
|
|||
if (cfg != NULL) {
|
||||
init_strlen = strlen(cfg->pr->stat_dlg->init_string);
|
||||
|
||||
if (strncmp (optarg, cfg->pr->stat_dlg->init_string, init_strlen) == 0){
|
||||
if (init_strlen == strlen(optarg)) {
|
||||
if (strncmp (opt_arg, cfg->pr->stat_dlg->init_string, init_strlen) == 0){
|
||||
if (init_strlen == strlen(opt_arg)) {
|
||||
st = stats_tree_new(cfg,pr,NULL);
|
||||
} else {
|
||||
st = stats_tree_new(cfg,pr,(char*)optarg+init_strlen+1);
|
||||
st = stats_tree_new(cfg,pr,(char*)opt_arg+init_strlen+1);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -222,7 +222,7 @@ init_gtk_tree(const char* optarg, void *userdata _U_)
|
|||
g_free(abbr);
|
||||
|
||||
} else {
|
||||
report_failure("could not obtain stats_tree abbr from optarg");
|
||||
report_failure("could not obtain stats_tree abbr from opt_arg");
|
||||
g_free(pr);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ wsp_init_table(wspstat_t *sp)
|
|||
/* When called, this function will create a new instance of gtk2-wspstat.
|
||||
*/
|
||||
static void
|
||||
gtk_wspstat_init(const char *optarg, void *userdata _U_)
|
||||
gtk_wspstat_init(const char *opt_arg, void *userdata _U_)
|
||||
{
|
||||
wspstat_t *sp;
|
||||
const char *filter;
|
||||
|
@ -298,8 +298,8 @@ gtk_wspstat_init(const char *optarg, void *userdata _U_)
|
|||
wsp_status_code_t *sc;
|
||||
const value_string *wsp_vals_status_p;
|
||||
|
||||
if (strncmp(optarg, "wsp,stat,", 9) == 0) {
|
||||
filter = optarg+9;
|
||||
if (strncmp(opt_arg, "wsp,stat,", 9) == 0) {
|
||||
filter = opt_arg+9;
|
||||
} else {
|
||||
filter = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue