diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-12-05 15:56:36 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-12-05 15:56:36 +0000 |
commit | 7cd0417af555a78b19c6909a40d1867e0fe9a063 (patch) | |
tree | cc09f739029479eee683f26228e098db307fd1aa /ui | |
parent | f8ba6b5a077fa89f1d1e55b5bed4bab0ea6b11cf (diff) |
Fix numerous instances of a variable/parameter name "shadowing" a library function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).
svn path=/trunk/; revision=46402
Diffstat (limited to 'ui')
62 files changed, 256 insertions, 255 deletions
diff --git a/ui/export_object.c b/ui/export_object.c index a85a0a2b46..5a07651075 100644 --- a/ui/export_object.c +++ b/ui/export_object.c @@ -114,14 +114,14 @@ eo_save_entry(const gchar *save_as_filename, export_object_entry_t *entry, gbool #define HEXTOASCII(x) (((x) < 10) ? ((x) + '0') : ((x) - 10 + 'a')) #define MAXFILELEN 255 -static GString *eo_rename(GString *gstr, int dup) +static GString *eo_rename(GString *gstr, int dupn) { GString *gstr_tmp; gchar *tmp_ptr; GString *ext_str; gstr_tmp = g_string_new("("); - g_string_append_printf (gstr_tmp, "%d)", dup); + g_string_append_printf (gstr_tmp, "%d)", dupn); if ( (tmp_ptr = strrchr(gstr->str, '.')) != NULL ) { /* Retain the extension */ ext_str = g_string_new(tmp_ptr); @@ -142,7 +142,7 @@ static GString *eo_rename(GString *gstr, int dup) } GString * -eo_massage_str(const gchar *in_str, gsize maxlen, int dup) +eo_massage_str(const gchar *in_str, gsize maxlen, int dupn) { gchar *tmp_ptr; /* The characters in "reject" come from: @@ -178,8 +178,8 @@ eo_massage_str(const gchar *in_str, gsize maxlen, int dup) else out_str = g_string_truncate(out_str, maxlen); } - if ( dup != 0 ) - out_str = eo_rename(out_str, dup); + if ( dupn != 0 ) + out_str = eo_rename(out_str, dupn); return out_str; } diff --git a/ui/gtk/afp_stat.c b/ui/gtk/afp_stat.c index 5842af83c6..e38063ee4b 100644 --- a/ui/gtk/afp_stat.c +++ b/ui/gtk/afp_stat.c @@ -110,7 +110,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) static void -gtk_afpstat_init(const char *optarg, void *userdata _U_) +gtk_afpstat_init(const char *opt_arg, void *userdata _U_) { afpstat_t *ss; const char *filter=NULL; @@ -122,8 +122,8 @@ gtk_afpstat_init(const char *optarg, void *userdata _U_) GtkWidget *bbox; GtkWidget *close_bt; - if(!strncmp(optarg,"afp,srt,",8)){ - filter=optarg+8; + if(!strncmp(opt_arg,"afp,srt,",8)){ + filter=opt_arg+8; } else { filter=NULL; } diff --git a/ui/gtk/ansi_map_stat.c b/ui/gtk/ansi_map_stat.c index b5fc741a1f..c1f9d0cdb8 100644 --- a/ui/gtk/ansi_map_stat.c +++ b/ui/gtk/ansi_map_stat.c @@ -342,7 +342,7 @@ ansi_map_stat_gtk_cb(GtkAction *action _U_, gpointer user_data _U_) static void ansi_map_stat_gtk_init( - const char *optarg _U_, + const char *opt_arg _U_, void* userdata _U_ ) { ansi_map_stat_gtk_cb(NULL, NULL); diff --git a/ui/gtk/bootp_stat.c b/ui/gtk/bootp_stat.c index 0cabf6e724..b7f5d68a81 100644 --- a/ui/gtk/bootp_stat.c +++ b/ui/gtk/bootp_stat.c @@ -166,7 +166,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) /* When called, this function will create a new instance of gtk2-dhcpstat. */ static void -dhcpstat_init(const char *optarg, void *userdata _U_) +dhcpstat_init(const char *opt_arg, void *userdata _U_) { dhcpstat_t *sp; const char *filter; @@ -177,8 +177,8 @@ dhcpstat_init(const char *optarg, void *userdata _U_) GtkWidget *bt_close; GtkWidget *bbox; - if (strncmp(optarg, "bootp,stat,", 11) == 0) { - filter = optarg+11; + if (strncmp(opt_arg, "bootp,stat,", 11) == 0) { + filter = opt_arg+11; } else { filter = NULL; } diff --git a/ui/gtk/camel_counter.c b/ui/gtk/camel_counter.c index 2e70c4def9..185b9b7aad 100644 --- a/ui/gtk/camel_counter.c +++ b/ui/gtk/camel_counter.c @@ -57,7 +57,7 @@ static int gtk_camelcounter_packet(void *phs, const void *phi); static void gtk_camelcounter_draw(void *phs); static void win_destroy_cb(GtkWindow *win _U_, gpointer data); -static void gtk_camelcounter_init(const char *optarg, void *userdata _U_); +static void gtk_camelcounter_init(const char *opt_arg, void *userdata _U_); void register_tap_listener_gtk_camelcounter(void); /* following values represent the size of their valuestring arrays */ @@ -144,7 +144,7 @@ static const stat_column titles[]={ {G_TYPE_UINT, RIGHT, "Count" } }; -static void gtk_camelcounter_init(const char *optarg, void *userdata _U_) +static void gtk_camelcounter_init(const char *opt_arg, void *userdata _U_) { struct camelcounter_t *p_camelcounter; const char *filter=NULL; @@ -152,8 +152,8 @@ static void gtk_camelcounter_init(const char *optarg, void *userdata _U_) GtkWidget *bbox; GtkWidget *close_bt; - if(strncmp(optarg,"camel,counter,",14) == 0){ - filter=optarg+14; + if(strncmp(opt_arg,"camel,counter,",14) == 0){ + filter=opt_arg+14; } else { filter=NULL; } diff --git a/ui/gtk/camel_srt.c b/ui/gtk/camel_srt.c index ec4f2cb8ff..639dbb0847 100644 --- a/ui/gtk/camel_srt.c +++ b/ui/gtk/camel_srt.c @@ -66,7 +66,7 @@ static int camelsrt_packet(void *phs, static void camelsrt_draw(void *phs); static void win_destroy_cb(GtkWindow *win _U_, gpointer data); -static void gtk_camelsrt_init(const char *optarg, void *userdata _U_); +static void gtk_camelsrt_init(const char *opt_arg, void *userdata _U_); void register_tap_listener_gtk_camelsrt(void); /* @@ -131,7 +131,7 @@ static void win_destroy_cb(GtkWindow *win _U_, gpointer data) g_free(hs); } -static void gtk_camelsrt_init(const char *optarg, void *userdata _U_) +static void gtk_camelsrt_init(const char *opt_arg, void *userdata _U_) { struct camelsrt_t * p_camelsrt; const char *filter=NULL; @@ -146,8 +146,8 @@ static void gtk_camelsrt_init(const char *optarg, void *userdata _U_) GtkWidget *close_bt; int i; - if(strncmp(optarg,"camel,srt,",10) == 0){ - filter=optarg+10; + if(strncmp(opt_arg,"camel,srt,",10) == 0){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c index 7a6459d06b..4a1383bb13 100644 --- a/ui/gtk/capture_dlg.c +++ b/ui/gtk/capture_dlg.c @@ -284,7 +284,7 @@ void update_visible_columns_menu (void); static void -update_options_table(gint index); +update_options_table(gint indx); static gboolean query_tooltip_tree_view_cb (GtkWidget *widget, @@ -295,11 +295,11 @@ query_tooltip_tree_view_cb (GtkWidget *widget, gpointer data); static -gchar *col_index_to_name(gint index) +gchar *col_index_to_name(gint indx) { gchar *col_name; - switch (index) + switch (indx) { case INTERFACE: col_name = g_strdup("INTERFACE"); break; @@ -2340,7 +2340,7 @@ options_edit_destroy_cb(GtkWidget *win, gpointer user_data _U_) } static void -update_options_table(gint index) +update_options_table(gint indx) { interface_t device; GtkTreePath *path; @@ -2375,7 +2375,7 @@ update_options_table(gint index) } if (cap_open_w) { if_cb = (GtkTreeView *) g_object_get_data(G_OBJECT(cap_open_w), E_CAP_IFACE_KEY); - path_str = g_strdup_printf("%d", index); + path_str = g_strdup_printf("%d", indx); path = gtk_tree_path_new_from_string(path_str); model = gtk_tree_view_get_model(if_cb); gtk_tree_model_get_iter(model, &iter, path); @@ -2976,7 +2976,7 @@ static void toggle_callback(GtkCellRendererToggle *cell _U_, GtkWidget *pcap_ng_cb, *filter_cm; interface_t device; gchar *name; - gint index = -1; + gint indx = -1; guint i; if_cb = (GtkTreeView *) g_object_get_data(G_OBJECT(cap_open_w), E_CAP_IFACE_KEY); @@ -2989,7 +2989,7 @@ static void toggle_callback(GtkCellRendererToggle *cell _U_, for (i = 0; i < global_capture_opts.all_ifaces->len; i++) { device = g_array_index(global_capture_opts.all_ifaces, interface_t, i); if (strcmp(device.name, name) == 0) { - index = i; + indx = i; break; } } @@ -3003,9 +3003,9 @@ static void toggle_callback(GtkCellRendererToggle *cell _U_, } device.locked = TRUE; } - if (index != -1) { - global_capture_opts.all_ifaces = g_array_remove_index(global_capture_opts.all_ifaces, index); - g_array_insert_val(global_capture_opts.all_ifaces, index, device); + if (indx != -1) { + global_capture_opts.all_ifaces = g_array_remove_index(global_capture_opts.all_ifaces, indx); + g_array_insert_val(global_capture_opts.all_ifaces, indx, device); pcap_ng_cb = (GtkWidget *) g_object_get_data(G_OBJECT(cap_open_w), E_CAP_PCAP_NG_KEY); if (global_capture_opts.num_selected >= 2) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pcap_ng_cb), TRUE); @@ -3035,8 +3035,8 @@ static void toggle_callback(GtkCellRendererToggle *cell _U_, } } device.locked = FALSE; - global_capture_opts.all_ifaces = g_array_remove_index(global_capture_opts.all_ifaces, index); - g_array_insert_val(global_capture_opts.all_ifaces, index, device); + global_capture_opts.all_ifaces = g_array_remove_index(global_capture_opts.all_ifaces, indx); + g_array_insert_val(global_capture_opts.all_ifaces, indx, device); gtk_tree_path_free (path); filter_cm = (GtkWidget *)g_object_get_data(G_OBJECT(cap_open_w), E_ALL_CFILTER_CM_KEY); if (strcmp(gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT(filter_cm)),"") != 0) { @@ -3302,7 +3302,7 @@ static void add_pipe_cb(gpointer w _U_) { interface_t device; - gint index; + gint indx; GtkTreeView *if_cb; GtkTreeModel *model; GtkTreeIter iter; @@ -3365,7 +3365,7 @@ add_pipe_cb(gpointer w _U_) #endif global_capture_opts.num_selected++; - index = global_capture_opts.all_ifaces->len; + indx = global_capture_opts.all_ifaces->len; temp = g_strdup_printf("<b>%s</b>", device.display_name); if (device.has_snaplen) { @@ -3375,7 +3375,7 @@ add_pipe_cb(gpointer w _U_) } if_cb = (GtkTreeView *) g_object_get_data(G_OBJECT(cap_open_w), E_CAP_IFACE_KEY); - path_str = g_strdup_printf("%d", index); + path_str = g_strdup_printf("%d", indx); model = gtk_tree_view_get_model(if_cb); gtk_tree_model_get_iter_from_string(model, &iter, path_str); g_array_append_val(global_capture_opts.all_ifaces, device); @@ -5494,9 +5494,9 @@ activate_monitor(GtkTreeViewColumn *tree_column _U_, GtkCellRenderer *renderer, { interface_t device; GtkTreePath *path = gtk_tree_model_get_path(tree_model, iter); - int index = atoi(gtk_tree_path_to_string(path)); + int indx = atoi(gtk_tree_path_to_string(path)); - device = g_array_index(global_capture_opts.all_ifaces, interface_t, index); + device = g_array_index(global_capture_opts.all_ifaces, interface_t, indx); if (device.monitor_mode_supported == TRUE) { g_object_set(G_OBJECT(renderer), "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL); diff --git a/ui/gtk/cfilter_combo_utils.c b/ui/gtk/cfilter_combo_utils.c index 39cdda78ed..1b1b1a09c9 100644 --- a/ui/gtk/cfilter_combo_utils.c +++ b/ui/gtk/cfilter_combo_utils.c @@ -82,12 +82,12 @@ void /* add a capture filter coming from the user's recent file to the cfilter combo box */ gboolean cfilter_combo_add_recent(gchar *s) { - gchar *dup; + gchar *dupstr; if (s) { - dup = g_strdup(s); - if (!cfilter_combo_add(dup)) { - g_free(dup); + dupstr = g_strdup(s); + if (!cfilter_combo_add(dupstr)) { + g_free(dupstr); return FALSE; } } diff --git a/ui/gtk/compare_stat.c b/ui/gtk/compare_stat.c index 4a80b5ce2b..62d36c34e7 100644 --- a/ui/gtk/compare_stat.c +++ b/ui/gtk/compare_stat.c @@ -685,7 +685,7 @@ setup_tree_view(GtkWidget *treeview) /* when called, this function will create a new instance of gtk2-comparestat. */ static void -gtk_comparestat_init(const char *optarg, void* userdata _U_) +gtk_comparestat_init(const char *opt_arg, void* userdata _U_) { compstat_t *cs; char *display_name; @@ -702,12 +702,12 @@ gtk_comparestat_init(const char *optarg, void* userdata _U_) const char *filter=NULL; GString *error_string; - if(sscanf(optarg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){ + if(sscanf(opt_arg,"compare,%d,%d,%d,%d,%lf%n",&start, &stop, &ttl, &order, &variance, &pos)==5){ if(pos){ - if(*(optarg+pos)==',') - filter=optarg+pos+1; + if(*(opt_arg+pos)==',') + filter=opt_arg+pos+1; else - filter=optarg+pos; + filter=opt_arg+pos; } else { filter=NULL; } diff --git a/ui/gtk/conversations_eth.c b/ui/gtk/conversations_eth.c index 6181b3bf35..41b79d4747 100644 --- a/ui/gtk/conversations_eth.c +++ b/ui/gtk/conversations_eth.c @@ -51,12 +51,12 @@ eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -eth_conversation_init(const char *optarg, void* userdata _U_) +eth_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,eth,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"conv,eth,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/conversations_fc.c b/ui/gtk/conversations_fc.c index b455538c5d..34dbb7c312 100644 --- a/ui/gtk/conversations_fc.c +++ b/ui/gtk/conversations_fc.c @@ -54,12 +54,12 @@ fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c static void -fc_conversation_init(const char *optarg, void* userdata _U_) +fc_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,fc,",8)){ - filter=optarg+8; + if(!strncmp(opt_arg,"conv,fc,",8)){ + filter=opt_arg+8; } else { filter=NULL; } diff --git a/ui/gtk/conversations_fddi.c b/ui/gtk/conversations_fddi.c index 85b9de3926..e18aaf6f4f 100644 --- a/ui/gtk/conversations_fddi.c +++ b/ui/gtk/conversations_fddi.c @@ -51,12 +51,12 @@ fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -fddi_conversation_init(const char *optarg, void* userdata _U_ ) +fddi_conversation_init(const char *opt_arg, void* userdata _U_ ) { const char *filter=NULL; - if(!strncmp(optarg,"conv,fddi,",10)){ - filter=optarg+10; + if(!strncmp(opt_arg,"conv,fddi,",10)){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/conversations_ip.c b/ui/gtk/conversations_ip.c index 19ac825cb8..3cf503b0f8 100644 --- a/ui/gtk/conversations_ip.c +++ b/ui/gtk/conversations_ip.c @@ -49,12 +49,12 @@ ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c } static void -ip_conversation_init(const char *optarg, void* userdata _U_) +ip_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,ip,",8)){ - filter=optarg+8; + if(!strncmp(opt_arg,"conv,ip,",8)){ + filter=opt_arg+8; } else { filter=NULL; } diff --git a/ui/gtk/conversations_ipv6.c b/ui/gtk/conversations_ipv6.c index 02b44a5d3e..3bc2ee8307 100644 --- a/ui/gtk/conversations_ipv6.c +++ b/ui/gtk/conversations_ipv6.c @@ -58,12 +58,12 @@ ipv6_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -ipv6_conversation_init(const char *optarg, void *userdata _U_) +ipv6_conversation_init(const char *opt_arg, void *userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg, "conv,ipv6,", 10)) { - filter = optarg + 10; + if(!strncmp(opt_arg, "conv,ipv6,", 10)) { + filter = opt_arg + 10; } else { filter = NULL; diff --git a/ui/gtk/conversations_ipx.c b/ui/gtk/conversations_ipx.c index 87300ffc2b..f0751feffc 100644 --- a/ui/gtk/conversations_ipx.c +++ b/ui/gtk/conversations_ipx.c @@ -52,12 +52,12 @@ ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -ipx_conversation_init(const char *optarg, void* userdata _U_) +ipx_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,ipx,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"conv,ipx,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/conversations_jxta.c b/ui/gtk/conversations_jxta.c index a0c7759fbb..de82cc8b79 100644 --- a/ui/gtk/conversations_jxta.c +++ b/ui/gtk/conversations_jxta.c @@ -60,12 +60,12 @@ jxta_conversation_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt } static void -jxta_conversation_init(const char *optarg, void* userdata _U_) +jxta_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,jxta,",10)){ - filter=optarg+10; + if(!strncmp(opt_arg,"conv,jxta,",10)){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/conversations_ncp.c b/ui/gtk/conversations_ncp.c index 5554652a35..0bd48dc9c3 100644 --- a/ui/gtk/conversations_ncp.c +++ b/ui/gtk/conversations_ncp.c @@ -53,12 +53,12 @@ ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, } static void -ncp_conversation_init(const char *optarg, void* userdata _U_) +ncp_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,ncp,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"conv,ncp,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/conversations_rsvp.c b/ui/gtk/conversations_rsvp.c index b8684d964d..848d98052a 100644 --- a/ui/gtk/conversations_rsvp.c +++ b/ui/gtk/conversations_rsvp.c @@ -51,12 +51,12 @@ rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, } static void -rsvp_conversation_init(const char *optarg, void* userdata _U_) +rsvp_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,rsvp,",10)){ - filter=optarg+10; + if(!strncmp(opt_arg,"conv,rsvp,",10)){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/conversations_sctp.c b/ui/gtk/conversations_sctp.c index 067ff38f93..3c5a3b067f 100644 --- a/ui/gtk/conversations_sctp.c +++ b/ui/gtk/conversations_sctp.c @@ -61,12 +61,12 @@ sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -sctp_conversation_init(const char *optarg, void* userdata _U_) +sctp_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,sctp,",10)){ - filter=optarg+10; + if(!strncmp(opt_arg,"conv,sctp,",10)){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/conversations_tcpip.c b/ui/gtk/conversations_tcpip.c index a8c25ce0ef..6504d905de 100644 --- a/ui/gtk/conversations_tcpip.c +++ b/ui/gtk/conversations_tcpip.c @@ -51,12 +51,12 @@ tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ static void -tcpip_conversation_init(const char *optarg, void* userdata _U_) +tcpip_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,tcp,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"conv,tcp,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/conversations_tr.c b/ui/gtk/conversations_tr.c index 9559424338..28bc003ac2 100644 --- a/ui/gtk/conversations_tr.c +++ b/ui/gtk/conversations_tr.c @@ -51,12 +51,12 @@ tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c static void -tr_conversation_init(const char *optarg, void* userdata _U_) +tr_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,tr,",8)){ - filter=optarg+8; + if(!strncmp(opt_arg,"conv,tr,",8)){ + filter=opt_arg+8; } else { filter=NULL; } diff --git a/ui/gtk/conversations_udpip.c b/ui/gtk/conversations_udpip.c index 037f967baa..b9f03d21e8 100644 --- a/ui/gtk/conversations_udpip.c +++ b/ui/gtk/conversations_udpip.c @@ -51,12 +51,12 @@ udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ static void -udpip_conversation_init(const char *optarg, void* userdata _U_) +udpip_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,udp,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"conv,udp,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/conversations_usb.c b/ui/gtk/conversations_usb.c index 4d21ecee9f..8c320ba52a 100644 --- a/ui/gtk/conversations_usb.c +++ b/ui/gtk/conversations_usb.c @@ -48,12 +48,12 @@ usb_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -usb_conversation_init(const char *optarg, void* userdata _U_) +usb_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if (!strncmp(optarg, "conv,usb,", 9)) { - filter = optarg + 9; + if (!strncmp(opt_arg, "conv,usb,", 9)) { + filter = opt_arg + 9; } else { filter = NULL; } diff --git a/ui/gtk/conversations_wlan.c b/ui/gtk/conversations_wlan.c index 84856dbc92..f89a952bcf 100644 --- a/ui/gtk/conversations_wlan.c +++ b/ui/gtk/conversations_wlan.c @@ -51,12 +51,12 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -wlan_conversation_init(const char *optarg, void* userdata _U_) +wlan_conversation_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"conv,wlan,",10)){ - filter=optarg+10; + if(!strncmp(opt_arg,"conv,wlan,",10)){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/dcerpc_stat.c b/ui/gtk/dcerpc_stat.c index 2d6f8b0714..3bce9c98c6 100644 --- a/ui/gtk/dcerpc_stat.c +++ b/ui/gtk/dcerpc_stat.c @@ -178,7 +178,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(const char *optarg, void* userdata _U_) +gtk_dcerpcstat_init(const char *opt_arg, void* userdata _U_) { dcerpcstat_t *rs; guint32 i, max_procs; @@ -212,7 +212,7 @@ gtk_dcerpcstat_init(const char *optarg, void* userdata _U_) * if it's omitted? */ if(sscanf( - optarg, + opt_arg, "dcerpc,srt,%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x,%d.%d,%n", &d1,&d2,&d3,&d40,&d41,&d42,&d43,&d44,&d45,&d46,&d47,&major,&minor,&pos) == 13) { @@ -228,7 +228,7 @@ gtk_dcerpcstat_init(const char *optarg, void* userdata _U_) uuid.Data4[6] = d46; uuid.Data4[7] = d47; if(pos) { - filter = optarg+pos; + filter = opt_arg+pos; } else { filter = NULL; } diff --git a/ui/gtk/diameter_stat.c b/ui/gtk/diameter_stat.c index 11cbbfc78f..3ba9df845f 100644 --- a/ui/gtk/diameter_stat.c +++ b/ui/gtk/diameter_stat.c @@ -126,7 +126,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) static void -gtk_diameterstat_init(const char *optarg, void *userdata _U_) +gtk_diameterstat_init(const char *opt_arg, void *userdata _U_) { diameterstat_t *diameter; const char *filter=NULL; @@ -138,8 +138,8 @@ gtk_diameterstat_init(const char *optarg, void *userdata _U_) GtkWidget *close_bt; int* idx; - if(!strncmp(optarg,"diameter,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"diameter,",9)){ + filter=opt_arg+9; } else { filter="diameter"; /*NULL doesn't work here like in LDAP. Too little time/lazy to find out why ?*/ } diff --git a/ui/gtk/dlg_utils.c b/ui/gtk/dlg_utils.c index c1c32f2bd3..4855f436df 100644 --- a/ui/gtk/dlg_utils.c +++ b/ui/gtk/dlg_utils.c @@ -115,7 +115,7 @@ dlg_button_row_new(const gchar *stock_id_first, ...) const gchar *cap_details = NULL; #endif const gchar *clear = NULL; - const gchar *close = NULL; + const gchar *closex = NULL; const gchar *copy = NULL; const gchar *create_stat = NULL; const gchar *delete = NULL; @@ -165,7 +165,7 @@ dlg_button_row_new(const gchar *stock_id_first, ...) } else if (strcmp(stock_id, GTK_STOCK_CANCEL) == 0) { cancel = stock_id; } else if (strcmp(stock_id, GTK_STOCK_CLOSE) == 0) { - close = stock_id; + closex = stock_id; } else if (strcmp(stock_id, GTK_STOCK_CLEAR) == 0) { clear = stock_id; } else if (strcmp(stock_id, GTK_STOCK_REFRESH) == 0) { @@ -337,8 +337,8 @@ dlg_button_row_new(const gchar *stock_id_first, ...) dlg_button_new(hbox, button_hbox, ok); return hbox; } - if (save && close) { - dlg_button_new(hbox, button_hbox, close); + if (save && closex) { + dlg_button_new(hbox, button_hbox, closex); dlg_button_new(hbox, button_hbox, save); return hbox; } @@ -364,9 +364,9 @@ dlg_button_row_new(const gchar *stock_id_first, ...) } } if (buttons == 3) { - if (ok && save && close) { + if (ok && save && closex) { dlg_button_new(hbox, button_hbox, save); - dlg_button_new(hbox, button_hbox, close); + dlg_button_new(hbox, button_hbox, closex); dlg_button_new(hbox, button_hbox, ok); return hbox; } @@ -376,9 +376,9 @@ dlg_button_row_new(const gchar *stock_id_first, ...) dlg_button_new(hbox, button_hbox, ok); return hbox; } - if (apply && save && close) { + if (apply && save && closex) { dlg_button_new(hbox, button_hbox, save); - dlg_button_new(hbox, button_hbox, close); + dlg_button_new(hbox, button_hbox, closex); dlg_button_new(hbox, button_hbox, apply); return hbox; } @@ -403,10 +403,10 @@ dlg_button_row_new(const gchar *stock_id_first, ...) dlg_button_new(hbox, button_hbox, ok); return hbox; } - if (ok && apply && save && close) { + if (ok && apply && save && closex) { dlg_button_new(hbox, button_hbox, save); dlg_button_new(hbox, button_hbox, apply); - dlg_button_new(hbox, button_hbox, close); + dlg_button_new(hbox, button_hbox, closex); dlg_button_new(hbox, button_hbox, ok); return hbox; } @@ -439,7 +439,7 @@ dlg_button_row_new(const gchar *stock_id_first, ...) if (follow_stream != NULL) dlg_button_new(hbox, button_hbox, follow_stream); if (graph_a_b != NULL) dlg_button_new(hbox, button_hbox, graph_a_b); if (graph_b_a != NULL) dlg_button_new(hbox, button_hbox, graph_b_a); - if (close != NULL) dlg_button_new(hbox, button_hbox, close); + if (closex != NULL) dlg_button_new(hbox, button_hbox, closex); if (cancel != NULL) dlg_button_new(hbox, button_hbox, cancel); return hbox; diff --git a/ui/gtk/expert_comp_dlg.c b/ui/gtk/expert_comp_dlg.c index 64edc0f606..712b35616d 100644 --- a/ui/gtk/expert_comp_dlg.c +++ b/ui/gtk/expert_comp_dlg.c @@ -758,7 +758,7 @@ expert_dlg_draw(void *data) } static void -expert_comp_init(const char *optarg _U_, void* userdata _U_) +expert_comp_init(const char *opt_arg _U_, void* userdata _U_) { expert_comp_dlg_t *ss; const char *filter=NULL; diff --git a/ui/gtk/fc_stat.c b/ui/gtk/fc_stat.c index 2bc97fac53..fa4f8bad5e 100644 --- a/ui/gtk/fc_stat.c +++ b/ui/gtk/fc_stat.c @@ -115,7 +115,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) static void -gtk_fcstat_init(const char *optarg, void *userdata _U_) +gtk_fcstat_init(const char *opt_arg, void *userdata _U_) { fcstat_t *fc; const char *filter=NULL; @@ -127,8 +127,8 @@ gtk_fcstat_init(const char *optarg, void *userdata _U_) GtkWidget *bbox; GtkWidget *close_bt; - if(!strncmp(optarg,"fc,srt,",7)){ - filter=optarg+7; + if(!strncmp(opt_arg,"fc,srt,",7)){ + filter=opt_arg+7; } else { filter=NULL; } diff --git a/ui/gtk/filter_expression_save_dlg.c b/ui/gtk/filter_expression_save_dlg.c index 9b10e5f8fc..1c9b598de1 100644 --- a/ui/gtk/filter_expression_save_dlg.c +++ b/ui/gtk/filter_expression_save_dlg.c @@ -135,10 +135,10 @@ filter_expression_reinit(int what) } if ((what & FILTER_EXPRESSION_REINIT_CREATE) != 0) { - gint maxindex = -1, index; + gint maxindx = -1, indx; fe = *pfilter_expression_head; while (fe != NULL) { - maxindex = MAX(maxindex, fe->index); + maxindx = MAX(maxindx, fe->index); fe = fe->next; } @@ -149,10 +149,10 @@ filter_expression_reinit(int what) * The list should be in the order identified by the * index member. */ - for (index = 0; index <= maxindex; index++) { + for (indx = 0; indx <= maxindx; indx++) { if (prevhead != NULL) { fe = prevhead; - while (fe != NULL && fe->index != index) + while (fe != NULL && fe->index != indx) fe = fe->next; } if (fe == NULL) diff --git a/ui/gtk/gsm_a_stat.c b/ui/gtk/gsm_a_stat.c index 3e85b5e20d..1bc5c8d5cc 100644 --- a/ui/gtk/gsm_a_stat.c +++ b/ui/gtk/gsm_a_stat.c @@ -449,7 +449,7 @@ void gsm_a_stat_gtk_bssmap_cb(GtkAction *action _U_, gpointer user_data _U_ ) static void gsm_a_stat_gtk_bssmap_init( - const char *optarg _U_, + const char *opt_arg _U_, void* userdata _U_) { gsm_a_stat_gtk_bssmap_cb(NULL, NULL); @@ -487,7 +487,7 @@ gsm_a_stat_gtk_dtap_mm_cb(GtkAction *action, gpointer user_data ) } static void -gsm_a_stat_gtk_dtap_mm_init(const char *optarg _U_, +gsm_a_stat_gtk_dtap_mm_init(const char *opt_arg _U_, void* userdata _U_) { gsm_a_stat_gtk_dtap_mm_cb(NULL, NULL); @@ -502,7 +502,7 @@ gsm_a_stat_gtk_dtap_rr_cb(GtkAction *action, gpointer user_data ) } static void -gsm_a_stat_gtk_dtap_rr_init(const char *optarg _U_, +gsm_a_stat_gtk_dtap_rr_init(const char *opt_arg _U_, void* userdata _U_) { gsm_a_stat_gtk_dtap_rr_cb(NULL, NULL); @@ -517,7 +517,7 @@ gsm_a_stat_gtk_dtap_cc_cb(GtkAction *action, gpointer user_data ) } static void -gsm_a_stat_gtk_dtap_cc_init(const char *optarg _U_, +gsm_a_stat_gtk_dtap_cc_init(const char *opt_arg _U_, void* userdata _U_) { gsm_a_stat_gtk_dtap_cc_cb(NULL, NULL); @@ -532,7 +532,7 @@ gsm_a_stat_gtk_dtap_gmm_cb(GtkAction *action, gpointer user_data ) } static void -gsm_a_stat_gtk_dtap_gmm_init(const char *optarg _U_, +gsm_a_stat_gtk_dtap_gmm_init(const char *opt_arg _U_, void* userdata _U_) { gsm_a_stat_gtk_dtap_gmm_cb(NULL, NULL); @@ -547,7 +547,7 @@ gsm_a_stat_gtk_dtap_sms_cb(GtkAction *action, gpointer user_data ) } static void -gsm_a_stat_gtk_dtap_sms_init(const char *optarg _U_, +gsm_a_stat_gtk_dtap_sms_init(const char *opt_arg _U_, void* userdata _U_) { gsm_a_stat_gtk_dtap_sms_cb(NULL, NULL); @@ -562,7 +562,7 @@ gsm_a_stat_gtk_dtap_sm_cb(GtkAction *action, gpointer user_data ) } static void -gsm_a_stat_gtk_dtap_sm_init(const char *optarg _U_, +gsm_a_stat_gtk_dtap_sm_init(const char *opt_arg _U_, void* userdata _U_) { gsm_a_stat_gtk_dtap_sm_cb(NULL, NULL); @@ -578,7 +578,7 @@ gsm_a_stat_gtk_dtap_ss_cb(GtkAction *action, gpointer user_data ) static void gsm_a_stat_gtk_dtap_ss_init( - const char *optarg _U_, + const char *opt_arg _U_, void *userdata _U_) { gsm_a_stat_gtk_dtap_ss_cb(NULL, NULL); @@ -594,7 +594,7 @@ gsm_a_stat_gtk_dtap_tp_cb(GtkAction *action, gpointer user_data ) static void gsm_a_stat_gtk_dtap_tp_init( - const char *optarg _U_, + const char *opt_arg _U_, void *userdata _U_) { gsm_a_stat_gtk_dtap_tp_cb(NULL, NULL); @@ -619,7 +619,7 @@ gsm_a_stat_gtk_sacch_rr_cb(GtkAction *action _U_, gpointer user_data _U_ ) static void gsm_a_stat_gtk_sacch_rr_init( - const char *optarg _U_, + const char *opt_arg _U_, void* userdata _U_) { gsm_a_stat_gtk_sacch_rr_cb(NULL, NULL); diff --git a/ui/gtk/gsm_map_stat.c b/ui/gtk/gsm_map_stat.c index 1ca0c0153f..db0ee33df7 100644 --- a/ui/gtk/gsm_map_stat.c +++ b/ui/gtk/gsm_map_stat.c @@ -442,7 +442,7 @@ gsm_map_stat_gtk_cb(GtkAction *action _U_, gpointer user_data _U_) static void -gsm_map_stat_gtk_init(const char *optarg _U_, +gsm_map_stat_gtk_init(const char *opt_arg _U_, void* userdata _U_) { gsm_map_stat_gtk_cb(NULL, NULL); diff --git a/ui/gtk/gtp_stat.c b/ui/gtk/gtp_stat.c index 48382a8c3a..5e04472a3b 100644 --- a/ui/gtk/gtp_stat.c +++ b/ui/gtk/gtp_stat.c @@ -134,7 +134,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) static void -gtk_gtpstat_init(const char *optarg, void *userdata _U_) +gtk_gtpstat_init(const char *opt_arg, void *userdata _U_) { gtpstat_t *gtp; const char *filter=NULL; @@ -145,8 +145,8 @@ gtk_gtpstat_init(const char *optarg, void *userdata _U_) GtkWidget *bbox; GtkWidget *close_bt; - if(!strncmp(optarg,"gtp,",4)){ - filter=optarg+4; + if(!strncmp(opt_arg,"gtp,",4)){ + filter=opt_arg+4; } else { filter="gtp"; /*NULL doesn't work here like in LDAP. Too little time/lazy to find out why ?*/ } diff --git a/ui/gtk/h225_counter.c b/ui/gtk/h225_counter.c index 9269ff24ed..b9d72fa311 100644 --- a/ui/gtk/h225_counter.c +++ b/ui/gtk/h225_counter.c @@ -48,7 +48,7 @@ #include "ui/gtk/old-gtk-compat.h" -static void gtk_h225counter_init(const char *optarg, void *userdata); +static void gtk_h225counter_init(const char *opt_arg, void *userdata); static tap_param h225_counter_params[] = { { PARAM_FILTER, "Filter", NULL } @@ -504,7 +504,7 @@ static const stat_column titles[]={ }; static void -gtk_h225counter_init(const char *optarg, void *userdata _U_) +gtk_h225counter_init(const char *opt_arg, void *userdata _U_) { h225counter_t *hs; GString *error_string; @@ -513,8 +513,8 @@ gtk_h225counter_init(const char *optarg, void *userdata _U_) hs=g_malloc(sizeof(h225counter_t)); - if(strncmp(optarg,"h225,counter,",13) == 0){ - hs->filter=g_strdup(optarg+13); + if(strncmp(opt_arg,"h225,counter,",13) == 0){ + hs->filter=g_strdup(opt_arg+13); } else { hs->filter=NULL; } diff --git a/ui/gtk/h225_ras_srt.c b/ui/gtk/h225_ras_srt.c index 36938b0d01..17607e7851 100644 --- a/ui/gtk/h225_ras_srt.c +++ b/ui/gtk/h225_ras_srt.c @@ -49,7 +49,7 @@ #include "ui/gtk/old-gtk-compat.h" -static void gtk_h225rassrt_init(const char *optarg, void *userdata); +static void gtk_h225rassrt_init(const char *opt_arg, void *userdata); static tap_param h225_rassrt_params[] = { { PARAM_FILTER, "Filter", NULL } @@ -272,7 +272,7 @@ static const stat_column titles[]={ }; static void -gtk_h225rassrt_init(const char *optarg, void *userdata _U_) +gtk_h225rassrt_init(const char *opt_arg, void *userdata _U_) { h225rassrt_t *hs; GString *error_string; @@ -281,8 +281,8 @@ gtk_h225rassrt_init(const char *optarg, void *userdata _U_) hs=g_malloc(sizeof(h225rassrt_t)); - if(strncmp(optarg,"h225,srt,",9) == 0){ - hs->filter=g_strdup(optarg+9); + if(strncmp(opt_arg,"h225,srt,",9) == 0){ + hs->filter=g_strdup(opt_arg+9); } else { hs->filter=NULL; } diff --git a/ui/gtk/hostlist_eth.c b/ui/gtk/hostlist_eth.c index 5311883ca0..a7564f5c2f 100644 --- a/ui/gtk/hostlist_eth.c +++ b/ui/gtk/hostlist_eth.c @@ -57,13 +57,13 @@ eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons static void -gtk_eth_hostlist_init(const char *optarg, +gtk_eth_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,eth,",10)){ - filter=optarg+10; + if(!strncmp(opt_arg,"hosts,eth,",10)){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_fc.c b/ui/gtk/hostlist_fc.c index 2b0587c798..cc054792d5 100644 --- a/ui/gtk/hostlist_fc.c +++ b/ui/gtk/hostlist_fc.c @@ -59,12 +59,12 @@ fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const static void -gtk_fc_hostlist_init(const char *optarg, void* userdata _U_) +gtk_fc_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,fc,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"hosts,fc,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_fddi.c b/ui/gtk/hostlist_fddi.c index a898ed3c9a..8b1c3fb553 100644 --- a/ui/gtk/hostlist_fddi.c +++ b/ui/gtk/hostlist_fddi.c @@ -56,12 +56,12 @@ fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con static void -gtk_fddi_hostlist_init(const char *optarg, void* userdata _U_) +gtk_fddi_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,fddi,",11)){ - filter=optarg+11; + if(!strncmp(opt_arg,"hosts,fddi,",11)){ + filter=opt_arg+11; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_ip.c b/ui/gtk/hostlist_ip.c index 09e099ab5b..0a4defc731 100644 --- a/ui/gtk/hostlist_ip.c +++ b/ui/gtk/hostlist_ip.c @@ -55,12 +55,12 @@ ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const } static void -gtk_ip_hostlist_init(const char *optarg, void* userdata _U_) +gtk_ip_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,ip,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"hosts,ip,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_ipv6.c b/ui/gtk/hostlist_ipv6.c index ac59f46096..faf9db593b 100644 --- a/ui/gtk/hostlist_ipv6.c +++ b/ui/gtk/hostlist_ipv6.c @@ -63,12 +63,12 @@ ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con static void -gtk_ipv6_hostlist_init(const char *optarg, void* userdata _U_) +gtk_ipv6_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,ipv6,",10)){ - filter = optarg + 10; + if(!strncmp(opt_arg,"hosts,ipv6,",10)){ + filter = opt_arg + 10; } else { filter = NULL; } diff --git a/ui/gtk/hostlist_ipx.c b/ui/gtk/hostlist_ipx.c index 81a70d308a..701d4c6c01 100644 --- a/ui/gtk/hostlist_ipx.c +++ b/ui/gtk/hostlist_ipx.c @@ -56,12 +56,12 @@ ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons static void -gtk_ipx_hostlist_init(const char *optarg, void* userdata _U_) +gtk_ipx_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,ipx,",10)){ - filter=optarg+10; + if(!strncmp(opt_arg,"hosts,ipx,",10)){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_jxta.c b/ui/gtk/hostlist_jxta.c index 5a32efc77c..c608d5191f 100644 --- a/ui/gtk/hostlist_jxta.c +++ b/ui/gtk/hostlist_jxta.c @@ -53,12 +53,12 @@ jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, } static void -gtk_jxta_hostlist_init(const char *optarg, void* userdata _U_) +gtk_jxta_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,jxta,",11)){ - filter=optarg+11; + if(!strncmp(opt_arg,"hosts,jxta,",11)){ + filter=opt_arg+11; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_ncp.c b/ui/gtk/hostlist_ncp.c index 785f69c86a..4693feeacb 100644 --- a/ui/gtk/hostlist_ncp.c +++ b/ui/gtk/hostlist_ncp.c @@ -54,12 +54,12 @@ ncp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons } static void -gtk_ncp_hostlist_init(const char *optarg, void* userdata _U_) +gtk_ncp_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,ncp,",10)){ - filter=optarg+10; + if(!strncmp(opt_arg,"hosts,ncp,",10)){ + filter=opt_arg+10; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_rsvp.c b/ui/gtk/hostlist_rsvp.c index c524b896b0..c0fa2139dd 100644 --- a/ui/gtk/hostlist_rsvp.c +++ b/ui/gtk/hostlist_rsvp.c @@ -58,12 +58,12 @@ rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con } static void -gtk_rsvp_hostlist_init(const char *optarg, void* userdata _U_) +gtk_rsvp_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,rsvp,",11)){ - filter=optarg+11; + if(!strncmp(opt_arg,"hosts,rsvp,",11)){ + filter=opt_arg+11; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_sctp.c b/ui/gtk/hostlist_sctp.c index 0fd1f94e03..6193253bc0 100644 --- a/ui/gtk/hostlist_sctp.c +++ b/ui/gtk/hostlist_sctp.c @@ -55,12 +55,12 @@ sctp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con } static void -gtk_sctp_hostlist_init(const char *optarg, void* userdata _U_) +gtk_sctp_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,sctp,",11)){ - filter=optarg+11; + if(!strncmp(opt_arg,"hosts,sctp,",11)){ + filter=opt_arg+11; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_tcpip.c b/ui/gtk/hostlist_tcpip.c index e19ae5e7c9..e78ef5e597 100644 --- a/ui/gtk/hostlist_tcpip.c +++ b/ui/gtk/hostlist_tcpip.c @@ -56,12 +56,12 @@ tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co static void -gtk_tcpip_hostlist_init(const char *optarg, void* userdata _U_) +gtk_tcpip_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"endpoints,tcp,",14)){ - filter=optarg+14; + if(!strncmp(opt_arg,"endpoints,tcp,",14)){ + filter=opt_arg+14; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_tr.c b/ui/gtk/hostlist_tr.c index 524194663d..6421899ffd 100644 --- a/ui/gtk/hostlist_tr.c +++ b/ui/gtk/hostlist_tr.c @@ -56,12 +56,12 @@ tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const static void -gtk_tr_hostlist_init(const char *optarg, void* userdata _U_) +gtk_tr_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,tr,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"hosts,tr,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_udpip.c b/ui/gtk/hostlist_udpip.c index f93b9086dc..033d8f8d0f 100644 --- a/ui/gtk/hostlist_udpip.c +++ b/ui/gtk/hostlist_udpip.c @@ -56,12 +56,12 @@ udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co static void -gtk_udpip_hostlist_init(const char *optarg, void* userdata _U_) +gtk_udpip_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"endpoints,udp,",14)){ - filter=optarg+14; + if(!strncmp(opt_arg,"endpoints,udp,",14)){ + filter=opt_arg+14; } else { filter=NULL; } diff --git a/ui/gtk/hostlist_usb.c b/ui/gtk/hostlist_usb.c index 2c7c6391a6..427028f7d6 100644 --- a/ui/gtk/hostlist_usb.c +++ b/ui/gtk/hostlist_usb.c @@ -53,12 +53,12 @@ usb_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons } static void -gtk_usb_hostlist_init(const char *optarg, void* userdata _U_) +gtk_usb_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if (!strncmp(optarg, "hosts,usb," ,10)) { - filter = optarg + 10; + if (!strncmp(opt_arg, "hosts,usb," ,10)) { + filter = opt_arg + 10; } else { filter = NULL; } diff --git a/ui/gtk/hostlist_wlan.c b/ui/gtk/hostlist_wlan.c index 2d5a61c1c4..a1e9ade7e5 100644 --- a/ui/gtk/hostlist_wlan.c +++ b/ui/gtk/hostlist_wlan.c @@ -54,12 +54,12 @@ wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con } static void -gtk_wlan_hostlist_init(const char *optarg, void* userdata _U_) +gtk_wlan_hostlist_init(const char *opt_arg, void* userdata _U_) { const char *filter=NULL; - if(!strncmp(optarg,"hosts,wlan,",11)){ - filter=optarg+11; + if(!strncmp(opt_arg,"hosts,wlan,",11)){ + filter=opt_arg+11; } else { filter=NULL; } diff --git a/ui/gtk/io_stat.c b/ui/gtk/io_stat.c index c3bc6b4690..9c4e092e84 100644 --- a/ui/gtk/io_stat.c +++ b/ui/gtk/io_stat.c @@ -1314,7 +1314,7 @@ disable_graph(io_stat_graph_t *gio) } static void -iostat_init(const char *optarg _U_, void* userdata _U_) +iostat_init(const char *opt_arg _U_, void* userdata _U_) { io_stat_t *io; int i=0, j=0; diff --git a/ui/gtk/ldap_stat.c b/ui/gtk/ldap_stat.c index 29eb96d144..828cc30ff9 100644 --- a/ui/gtk/ldap_stat.c +++ b/ui/gtk/ldap_stat.c @@ -128,7 +128,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) static void -gtk_ldapstat_init(const char *optarg, void *userdata _U_) +gtk_ldapstat_init(const char *opt_arg, void *userdata _U_) { ldapstat_t *ldap; const char *filter=NULL; @@ -139,8 +139,8 @@ gtk_ldapstat_init(const char *optarg, void *userdata _U_) GtkWidget *bbox; GtkWidget *close_bt; - if(!strncmp(optarg,"ldap,srt,",9)){ - filter=optarg+9; + if(!strncmp(opt_arg,"ldap,srt,",9)){ + filter=opt_arg+9; } else { filter=NULL; } diff --git a/ui/gtk/main_80211_toolbar.c b/ui/gtk/main_80211_toolbar.c index 557ba072d7..67fe847bb5 100644 --- a/ui/gtk/main_80211_toolbar.c +++ b/ui/gtk/main_80211_toolbar.c @@ -63,12 +63,12 @@ static void tb80211_set_info(char *errstr) } static -void add_channel_type(char *type, int oldtype, int index ) +void add_channel_type(char *type, int oldtype, int indx ) { gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(tb80211_chan_type_box), type); if (oldtype != -1 && oldtype == ws80211_str_to_chan_type(type)) { - gtk_combo_box_set_active(GTK_COMBO_BOX(tb80211_chan_type_box), index); + gtk_combo_box_set_active(GTK_COMBO_BOX(tb80211_chan_type_box), indx); tb80211_current_type = oldtype; } } diff --git a/ui/gtk/main_filter_toolbar.c b/ui/gtk/main_filter_toolbar.c index 6b92301785..2388261c70 100644 --- a/ui/gtk/main_filter_toolbar.c +++ b/ui/gtk/main_filter_toolbar.c @@ -285,7 +285,7 @@ filter_toolbar_new(void) } static gboolean -dfilter_entry_match(GtkWidget *filter_cm, char *s, int *index) +dfilter_entry_match(GtkWidget *filter_cm, char *s, int *indx) { GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX(filter_cm)); GtkTreeIter iter; @@ -295,7 +295,7 @@ dfilter_entry_match(GtkWidget *filter_cm, char *s, int *index) i = -1; if (!gtk_tree_model_get_iter_first (model, &iter)) { - *index = i; + *indx = i; return FALSE; } do { @@ -305,14 +305,14 @@ dfilter_entry_match(GtkWidget *filter_cm, char *s, int *index) if(filter_str) { if(strcmp(s, filter_str) == 0) { g_value_unset (&value); - *index = i; + *indx = i; return TRUE; } } g_value_unset (&value); } while (gtk_tree_model_iter_next (model, &iter)); - *index = -1; + *indx = -1; return FALSE; } @@ -320,9 +320,9 @@ dfilter_entry_match(GtkWidget *filter_cm, char *s, int *index) /* Note: a new filter string will not replace an old identical one */ static gboolean dfilter_combo_add(GtkWidget *filter_cm, char *s) { - int index; + int indx; - if(!dfilter_entry_match(filter_cm,s, &index)) + if(!dfilter_entry_match(filter_cm,s, &indx)) gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(filter_cm), s); g_free(s); @@ -358,11 +358,11 @@ dfilter_recent_combo_write_all(FILE *rf) { gboolean dfilter_combo_add_recent(gchar *s) { GtkWidget *filter_cm = g_object_get_data(G_OBJECT(top_level), E_DFILTER_CM_KEY); - char *dup; + char *dupstr; - dup = g_strdup(s); + dupstr = g_strdup(s); - return dfilter_combo_add(filter_cm, dup); + return dfilter_combo_add(filter_cm, dupstr); } /* call cf_filter_packets() and add this filter string to the recent filter list */ @@ -393,25 +393,25 @@ main_filter_packets(capture_file *cf, const gchar *dftext, gboolean force) our own filter list, and feed it to gtk_combo_set_popdown_strings when a new filter is added. */ if (cf_status == CF_OK && strlen(s) > 0) { - int index; + int indx; - if(!dfilter_entry_match(filter_cm,s, &index) || index > -1) { + if(!dfilter_entry_match(filter_cm,s, &indx) || indx > -1) { /* If the filter is already there but not the first entry, remove it */ - if (index > -1) { - gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(filter_cm), index); - index--; + if (indx > -1) { + gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(filter_cm), indx); + indx--; } /* Add the filter (at the head of the list) */ gtk_combo_box_text_prepend_text(GTK_COMBO_BOX_TEXT(filter_cm), s); - index++; + indx++; } /* If we have too many entries, remove some */ - while ((guint)index >= prefs.gui_recent_df_entries_max) { - gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(filter_cm), index); - index--; + while ((guint)indx >= prefs.gui_recent_df_entries_max) { + gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(filter_cm), indx); + indx--; } } if (free_filter) diff --git a/ui/gtk/main_welcome.c b/ui/gtk/main_welcome.c index 4b040626f2..6c612ae390 100644 --- a/ui/gtk/main_welcome.c +++ b/ui/gtk/main_welcome.c @@ -802,7 +802,7 @@ void change_selection_for_all(gboolean enable) #ifdef HAVE_LIBPCAP void -change_interface_name(gchar *oldname, guint index) +change_interface_name(gchar *oldname, guint indx) { GtkWidget *view; GtkTreeModel *model; @@ -815,7 +815,7 @@ change_interface_name(gchar *oldname, guint index) entry = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); - device = g_array_index(global_capture_opts.all_ifaces, interface_t, index); + device = g_array_index(global_capture_opts.all_ifaces, interface_t, indx); if (gtk_tree_model_get_iter_first (model, &iter)) { do { gtk_tree_model_get(model, &iter, IFACE_NAME, &optname, -1); @@ -834,7 +834,7 @@ change_interface_name(gchar *oldname, guint index) #ifdef HAVE_PCAP_REMOTE void -add_interface_to_list(guint index) +add_interface_to_list(guint indx) { GtkWidget *view, *icon; GtkTreeModel *model; @@ -843,7 +843,7 @@ add_interface_to_list(guint index) gchar *lines; interface_t device; - device = g_array_index(global_capture_opts.all_ifaces, interface_t, index); + device = g_array_index(global_capture_opts.all_ifaces, interface_t, indx); icon = pixbuf_to_widget(remote_sat_pb_data); view = g_object_get_data(G_OBJECT(welcome_hb), TREE_VIEW_INTERFACES); model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); diff --git a/ui/gtk/prefs_filter_expressions.c b/ui/gtk/prefs_filter_expressions.c index bfbbc474f8..4e618c68b1 100644 --- a/ui/gtk/prefs_filter_expressions.c +++ b/ui/gtk/prefs_filter_expressions.c @@ -346,7 +346,7 @@ filter_expressions_prefs_fetch(GtkWidget *w) GtkListStore *store; struct filter_expression *fe; gint first_row = TRUE; - gint index = 0; + gint indx = 0; column_l = (GtkTreeView *)g_object_get_data(G_OBJECT(w), E_FILTER_EXPRESSION_COLUMNL); @@ -359,7 +359,7 @@ filter_expressions_prefs_fetch(GtkWidget *w) while (items_left) { gtk_tree_model_get(model, &iter, DATA_COLUMN, &fe, -1); if (fe != NULL) - fe->index = index++; + fe->index = indx++; items_left = gtk_tree_model_iter_next (model, &iter); } diff --git a/ui/gtk/rtp_player.c b/ui/gtk/rtp_player.c index 2f4e757bb4..e2ef3447f7 100644 --- a/ui/gtk/rtp_player.c +++ b/ui/gtk/rtp_player.c @@ -304,14 +304,14 @@ rtp_decoder_value_destroy(gpointer dec_arg) /****************************************************************************/ static void -set_sensitive_check_bt(gchar *key _U_ , rtp_channel_info_t *rci, guint *stop _U_ ) +set_sensitive_check_bt(gchar *key _U_ , rtp_channel_info_t *rci, guint *stop_p ) { - gtk_widget_set_sensitive(rci->check_bt, !(*stop)); + gtk_widget_set_sensitive(rci->check_bt, !(*stop_p)); } /****************************************************************************/ static void -bt_state(gboolean decode, gboolean play, gboolean pause, gboolean stop) +bt_state(gboolean decode, gboolean play_state, gboolean pause_state, gboolean stop_state) { gboolean new_jitter_value = FALSE; gboolean false_val = FALSE; @@ -329,19 +329,19 @@ bt_state(gboolean decode, gboolean play, gboolean pause, gboolean stop) } /* set the sensitive state of play only if there is a channel selected */ - if ( play && (rtp_channels->rci[0] || rtp_channels->rci[1]) && !new_jitter_value) { + if ( play_state && (rtp_channels->rci[0] || rtp_channels->rci[1]) && !new_jitter_value) { gtk_widget_set_sensitive(bt_play, TRUE); } else { gtk_widget_set_sensitive(bt_play, FALSE); } if (!new_jitter_value) { - gtk_widget_set_sensitive(bt_pause, pause); - gtk_widget_set_sensitive(bt_stop, stop); + gtk_widget_set_sensitive(bt_pause, pause_state); + gtk_widget_set_sensitive(bt_stop, stop_state); /* Set sensitive to the check buttons based on the STOP state */ if (rtp_channels_hash) - g_hash_table_foreach( rtp_channels_hash, (GHFunc)set_sensitive_check_bt, &stop); + g_hash_table_foreach( rtp_channels_hash, (GHFunc)set_sensitive_check_bt, &stop_state); } else { gtk_widget_set_sensitive(bt_pause, FALSE); gtk_widget_set_sensitive(bt_stop, FALSE); diff --git a/ui/gtk/sctp_graph_dlg.c b/ui/gtk/sctp_graph_dlg.c index d51f904444..566b320791 100644 --- a/ui/gtk/sctp_graph_dlg.c +++ b/ui/gtk/sctp_graph_dlg.c @@ -144,7 +144,7 @@ draw_sack_graph(struct sctp_udata *u_data) GList *list=NULL, *tlist; guint16 gap_start=0, gap_end=0, i, j, nr, dup_nr; guint8 type; - guint32 tsnumber, dup; + guint32 tsnumber, dupx; gint xvalue, yvalue; GdkColor red_color = {0, 65535, 0, 0}; GdkColor green_color = {0, 0, 65535, 0}; @@ -282,15 +282,15 @@ draw_sack_graph(struct sctp_udata *u_data) dup_list = &sack_header->a_rwnd + 2 + nr; for (i = 0; i < dup_nr; i++) { - dup = g_ntohl(dup_list[i]); - if (dup >= min_tsn) + dupx = g_ntohl(dup_list[i]); + if (dupx >= min_tsn) { if (u_data->io->uoff) diff = sack->secs - u_data->io->min_x; else diff=sack->secs*1000000+sack->usecs-u_data->io->min_x; xvalue = (guint32)(LEFT_BORDER+u_data->io->offset+u_data->io->x_interval*diff); - yvalue = (guint32)(u_data->io->surface_height-BOTTOM_BORDER-POINT_SIZE -u_data->io->offset-((SUB_32(dup,min_tsn))*u_data->io->y_interval)); + yvalue = (guint32)(u_data->io->surface_height-BOTTOM_BORDER-POINT_SIZE -u_data->io->offset-((SUB_32(dupx,min_tsn))*u_data->io->y_interval)); if (xvalue >= LEFT_BORDER+u_data->io->offset && xvalue <= u_data->io->surface_width-RIGHT_BORDER+u_data->io->offset && yvalue >= TOP_BORDER-u_data->io->offset-POINT_SIZE && diff --git a/ui/gtk/service_response_time_table.c b/ui/gtk/service_response_time_table.c index fbd5d56f02..f957963a36 100644 --- a/ui/gtk/service_response_time_table.c +++ b/ui/gtk/service_response_time_table.c @@ -493,14 +493,14 @@ init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox, const char * } void -init_srt_table_row(srt_stat_table *rst, int index, const char *procedure) +init_srt_table_row(srt_stat_table *rst, int indx, const char *procedure) { /* we have discovered a new procedure. Extend the table accordingly */ - if(index>=rst->num_procs){ + if(indx>=rst->num_procs){ int old_num_procs=rst->num_procs; int i; - rst->num_procs=index+1; + rst->num_procs=indx+1; rst->procedures=g_realloc(rst->procedures, sizeof(srt_procedure_t)*(rst->num_procs)); for(i=old_num_procs;i<rst->num_procs;i++){ time_stat_init(&rst->procedures[i].stats); @@ -508,18 +508,18 @@ init_srt_table_row(srt_stat_table *rst, int index, const char *procedure) rst->procedures[i].procedure=NULL; } } - rst->procedures[index].index = index; - rst->procedures[index].procedure=g_strdup(procedure); + rst->procedures[indx].index = indx; + rst->procedures[indx].procedure=g_strdup(procedure); } void -add_srt_table_data(srt_stat_table *rst, int index, const nstime_t *req_time, packet_info *pinfo) +add_srt_table_data(srt_stat_table *rst, int indx, const nstime_t *req_time, packet_info *pinfo) { srt_procedure_t *rp; nstime_t t, delta; - g_assert(index >= 0 && index < rst->num_procs); - rp=&rst->procedures[index]; + g_assert(indx >= 0 && indx < rst->num_procs); + rp=&rst->procedures[indx]; /* * If the count of calls for this procedure is currently zero, it's diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c index 1c50445ffb..d287354627 100644 --- a/ui/gtk/tcp_graph.c +++ b/ui/gtk/tcp_graph.c @@ -3715,14 +3715,14 @@ static gboolean button_release_event (GtkWidget *widget _U_, GdkEventButton *eve g->grab.grabbed = FALSE; if (event->button == MOUSE_BUTTON_LEFT) { - int x1 = zoomrect.x; - int x2 = (int)event->x; - int y1 = zoomrect.y; - int y2 = (int)event->y; - zoomrect.x = MIN(x1, x2); - zoomrect.width = abs(x1 - x2); - zoomrect.y = MIN(y1, y2); - zoomrect.height = abs(y1 - y2); + int xx1 = zoomrect.x; + int xx2 = (int)event->x; + int yy1 = zoomrect.y; + int yy2 = (int)event->y; + zoomrect.x = MIN(xx1, xx2); + zoomrect.width = abs(xx1 - xx2); + zoomrect.y = MIN(yy1, yy2); + zoomrect.height = abs(yy1 - yy2); /* Finish selecting a region to zoom in on. Take care not to choose a too-small area (by accident?) */ diff --git a/ui/gtk/time_shift_dlg.c b/ui/gtk/time_shift_dlg.c index 57a31c8155..dc80cb58ac 100644 --- a/ui/gtk/time_shift_dlg.c +++ b/ui/gtk/time_shift_dlg.c @@ -114,15 +114,15 @@ time_shift_cb(GtkWidget *w _U_, gpointer d _U_) *adjtime_rb, *undo_rb, *bbox, *apply_bt, *close_bt, *help_bt; - + if (time_shift_frame_w != NULL) { /* There's already a "Time Shift" dialog box; reactivate it. */ reactivate_window(time_shift_frame_w); return; } - + time_shift_frame_w = dlg_window_new("Wireshark: Time Shift"); - + /* Container for each row of widgets */ main_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE); gtk_container_set_border_width(GTK_CONTAINER(main_vb), 5); @@ -237,7 +237,7 @@ time_shift_cb(GtkWidget *w _U_, gpointer d _U_) gtk_widget_set_tooltip_text(settime_time_text_box, "The time for the frame in the format of [YYYY-MM-DD] " "hh:mm:ss[.ddddddddd]"); - + /* * Set two Packet Numbers to Time frame and extrapolate */ @@ -372,7 +372,7 @@ time_shift_cb(GtkWidget *w _U_, gpointer d _U_) gtk_widget_show(undo_rb); gtk_widget_set_tooltip_text(undo_rb, "Undo all the Time Shift offsets on the frames."); - + /* * Button row */ @@ -619,7 +619,7 @@ action_timeshift(GtkWindow *parent_w) modify_time_perform(fd, neg, &offset, SHIFT_KEEPOFFSET); } packet_list_queue_draw(); - + return(0); } @@ -712,7 +712,7 @@ action_settime(GtkWindow *parent_w) long packetnumber; GtkWidget *time_te; const gchar *time_text; - nstime_t settime, difftime, packettime; + nstime_t set_time, diff_time, packet_time; frame_data *fd, *packetfd; guint32 i; @@ -731,13 +731,13 @@ action_settime(GtkWindow *parent_w) */ if ((packetfd = frame_data_sequence_find(cfile.frames, packetnumber)) == NULL) return; - nstime_delta(&packettime, &(packetfd->abs_ts), &(packetfd->shift_offset)); + nstime_delta(&packet_time, &(packetfd->abs_ts), &(packetfd->shift_offset)); - if (timestring2nstime(time_text, &packettime, &settime) != 0) + if (timestring2nstime(time_text, &packet_time, &set_time) != 0) return; /* Calculate difference between packet time and requested time */ - nstime_delta(&difftime, &settime, &packettime); + nstime_delta(&diff_time, &set_time, &packet_time); /* Up to here nothing is changed */ @@ -749,7 +749,7 @@ action_settime(GtkWindow *parent_w) for (i = 1; i <= cfile.count; i++) { if ((fd = frame_data_sequence_find(cfile.frames, i)) == NULL) continue; /* Shouldn't happen */ - modify_time_perform(fd, SHIFT_POS, &difftime, SHIFT_SETTOZERO); + modify_time_perform(fd, SHIFT_POS, &diff_time, SHIFT_SETTOZERO); } packet_list_queue_draw(); @@ -758,10 +758,10 @@ action_settime(GtkWindow *parent_w) /* * If the line between (OT1, NT1) and (OT2, NT2) is a straight line * and (OT3, NT3) is on that line, - * then (NT2 - NT1) / (OT2 - OT2) = (NT3 - NT1) / (OT3 - OT1) and + * then (NT2 - NT1) / (OT2 - OT2) = (NT3 - NT1) / (OT3 - OT1) and * then (OT3 - OT1) * (NT2 - NT1) / (OT2 - OT2) = (NT3 - NT1) and * then NT1 + (OT3 - OT1) * (NT2 - NT1) / (OT2 - OT2) = NT3 and - * then NT3 = NT1 + (OT3 - OT1) * (NT2 - NT1) / (OT2 - OT2) and + * then NT3 = NT1 + (OT3 - OT1) * (NT2 - NT1) / (OT2 - OT2) and * thus NT3 = NT1 + (OT3 - OT1) * (NT2 - NT1) / (OT2 - OT1) * or NT3 = NT1 + (OT3 - OT1) * ( deltaNT12 / deltaOT12) * @@ -861,7 +861,7 @@ action_adjtime(GtkWindow *parent_w _U_) if (timestring2nstime(time2_text, &ot2, &nt2) != 0) return; - + nstime_copy(&dot, &ot2); nstime_subtract(&dot, &ot1); diff --git a/ui/text_import.c b/ui/text_import.c index 45d48bae8c..690e6e8f00 100644 --- a/ui/text_import.c +++ b/ui/text_import.c @@ -512,7 +512,8 @@ write_current_packet (void) memset(&packet_buf[prefix_length+curr_offset], 0, eth_trailer_length); } - HDR_TCP.seq_num = g_htonl(g_ntohl(HDR_TCP.seq_num) + curr_offset); + HDR_TCP.seq_num = g_ntohl(HDR_TCP.seq_num) + curr_offset; + HDR_TCP.seq_num = g_htonl(HDR_TCP.seq_num); { /* Write the packet */ |