aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--capture_sync.c6
-rw-r--r--epan/diam_dict.l10
-rw-r--r--epan/dissectors/packet-dmp.c4
-rw-r--r--epan/dissectors/packet-epl.c28
-rw-r--r--epan/dissectors/packet-gmhdr.c10
-rw-r--r--epan/dissectors/packet-ieee80211-prism.c6
-rw-r--r--epan/dissectors/packet-mysql.c148
-rw-r--r--epan/dissectors/packet-radius.c42
-rw-r--r--epan/dissectors/packet-reload-framing.c46
-rw-r--r--epan/dissectors/packet-reload.c8
-rw-r--r--epan/dissectors/packet-rlc.c26
-rw-r--r--epan/dissectors/packet-sbus.c6
-rw-r--r--epan/dissectors/packet-sna.c140
-rw-r--r--epan/dissectors/packet-tcp.c4
-rw-r--r--epan/dissectors/packet-xmpp.c16
-rw-r--r--epan/follow.c6
-rw-r--r--epan/radius_dict.l4
-rw-r--r--epan/wslua/wslua_pinfo.c34
-rw-r--r--plugins/gryphon/packet-gryphon.c14
-rw-r--r--plugins/opcua/opcua.c10
-rw-r--r--plugins/opcua/opcua_extensionobjecttable.c10
-rw-r--r--plugins/opcua/opcua_servicetable.c16
-rw-r--r--plugins/wimax/msg_aas_beam.c30
-rw-r--r--plugins/wimaxasncp/wimaxasncp_dict.l10
-rw-r--r--ui/export_object.c10
-rw-r--r--ui/gtk/afp_stat.c6
-rw-r--r--ui/gtk/ansi_map_stat.c2
-rw-r--r--ui/gtk/bootp_stat.c6
-rw-r--r--ui/gtk/camel_counter.c8
-rw-r--r--ui/gtk/camel_srt.c8
-rw-r--r--ui/gtk/capture_dlg.c34
-rw-r--r--ui/gtk/cfilter_combo_utils.c8
-rw-r--r--ui/gtk/compare_stat.c10
-rw-r--r--ui/gtk/conversations_eth.c6
-rw-r--r--ui/gtk/conversations_fc.c6
-rw-r--r--ui/gtk/conversations_fddi.c6
-rw-r--r--ui/gtk/conversations_ip.c6
-rw-r--r--ui/gtk/conversations_ipv6.c6
-rw-r--r--ui/gtk/conversations_ipx.c6
-rw-r--r--ui/gtk/conversations_jxta.c6
-rw-r--r--ui/gtk/conversations_ncp.c6
-rw-r--r--ui/gtk/conversations_rsvp.c6
-rw-r--r--ui/gtk/conversations_sctp.c6
-rw-r--r--ui/gtk/conversations_tcpip.c6
-rw-r--r--ui/gtk/conversations_tr.c6
-rw-r--r--ui/gtk/conversations_udpip.c6
-rw-r--r--ui/gtk/conversations_usb.c6
-rw-r--r--ui/gtk/conversations_wlan.c6
-rw-r--r--ui/gtk/dcerpc_stat.c6
-rw-r--r--ui/gtk/diameter_stat.c6
-rw-r--r--ui/gtk/dlg_utils.c22
-rw-r--r--ui/gtk/expert_comp_dlg.c2
-rw-r--r--ui/gtk/fc_stat.c6
-rw-r--r--ui/gtk/filter_expression_save_dlg.c8
-rw-r--r--ui/gtk/gsm_a_stat.c20
-rw-r--r--ui/gtk/gsm_map_stat.c2
-rw-r--r--ui/gtk/gtp_stat.c6
-rw-r--r--ui/gtk/h225_counter.c8
-rw-r--r--ui/gtk/h225_ras_srt.c8
-rw-r--r--ui/gtk/hostlist_eth.c6
-rw-r--r--ui/gtk/hostlist_fc.c6
-rw-r--r--ui/gtk/hostlist_fddi.c6
-rw-r--r--ui/gtk/hostlist_ip.c6
-rw-r--r--ui/gtk/hostlist_ipv6.c6
-rw-r--r--ui/gtk/hostlist_ipx.c6
-rw-r--r--ui/gtk/hostlist_jxta.c6
-rw-r--r--ui/gtk/hostlist_ncp.c6
-rw-r--r--ui/gtk/hostlist_rsvp.c6
-rw-r--r--ui/gtk/hostlist_sctp.c6
-rw-r--r--ui/gtk/hostlist_tcpip.c6
-rw-r--r--ui/gtk/hostlist_tr.c6
-rw-r--r--ui/gtk/hostlist_udpip.c6
-rw-r--r--ui/gtk/hostlist_usb.c6
-rw-r--r--ui/gtk/hostlist_wlan.c6
-rw-r--r--ui/gtk/io_stat.c2
-rw-r--r--ui/gtk/ldap_stat.c6
-rw-r--r--ui/gtk/main_80211_toolbar.c4
-rw-r--r--ui/gtk/main_filter_toolbar.c36
-rw-r--r--ui/gtk/main_welcome.c8
-rw-r--r--ui/gtk/prefs_filter_expressions.c4
-rw-r--r--ui/gtk/rtp_player.c14
-rw-r--r--ui/gtk/sctp_graph_dlg.c8
-rw-r--r--ui/gtk/service_response_time_table.c16
-rw-r--r--ui/gtk/tcp_graph.c16
-rw-r--r--ui/gtk/time_shift_dlg.c28
-rw-r--r--ui/text_import.c3
86 files changed, 573 insertions, 572 deletions
diff --git a/capture_sync.c b/capture_sync.c
index a1d0aa29bd..eed62c4764 100644
--- a/capture_sync.c
+++ b/capture_sync.c
@@ -1715,12 +1715,12 @@ sync_pipe_input_cb(gint source, gpointer user_data)
break;
case SP_BAD_FILTER: {
char *ch;
- int index;
+ int indx;
ch = strtok(buffer, ":");
- index = (int)strtol(ch, NULL, 10);
+ indx = (int)strtol(ch, NULL, 10);
ch = strtok(NULL, ":");
- capture_input_cfilter_error_message(capture_opts, index, ch);
+ capture_input_cfilter_error_message(capture_opts, indx, ch);
/* the capture child will close the sync_pipe, nothing to do for now */
break;
}
diff --git a/epan/diam_dict.l b/epan/diam_dict.l
index 7874112428..b9006fb890 100644
--- a/epan/diam_dict.l
+++ b/epan/diam_dict.l
@@ -567,14 +567,14 @@ static void append_to_buffer(char* txt, int len) {
}
static size_t file_input(char* buf, size_t max) {
- size_t read;
+ size_t read_cnt;
- read = fread(buf,1,max,yyin);
+ read_cnt = fread(buf,1,max,yyin);
- if ( read == max ) {
+ if ( read_cnt == max ) {
return max;
- } else if (read > 0) {
- return read;
+ } else if (read_cnt > 0) {
+ return read_cnt;
} else {
return YY_NULL;
}
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c
index 3495485d9a..959e3a8430 100644
--- a/epan/dissectors/packet-dmp.c
+++ b/epan/dissectors/packet-dmp.c
@@ -1693,8 +1693,8 @@ static gchar *dissect_thales_ipm_id (tvbuff_t *tvb, gint offset, gint length, gi
if (length >= 6 && length <= 20 && modifier >= 0 && modifier <= 2) {
guint number = tvb_get_ntohs (tvb, offset + length - 6);
guint8 number_len = modifier + 2;
- time_t time = tvb_get_ntohl(tvb, offset + length - 4);
- struct tm *tmp = gmtime(&time);
+ time_t timev = tvb_get_ntohl(tvb, offset + length - 4);
+ struct tm *tmp = gmtime(&timev);
if (modifier == 1 && number >= 1024) {
/* The number is in the range 65536-99999 */
diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c
index 994d34acfd..98c563d6ab 100644
--- a/epan/dissectors/packet-epl.c
+++ b/epan/dissectors/packet-epl.c
@@ -1567,8 +1567,8 @@ gint
dissect_epl_sdo_command_write_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 segmented, gboolean response)
{
gint size;
- guint16 index;
- guint8 subindex;
+ guint16 indx;
+ guint8 subindx;
guint32 val;
proto_item* item;
@@ -1576,23 +1576,23 @@ dissect_epl_sdo_command_write_by_index(proto_tree *epl_tree, tvbuff_t *tvb, pack
{ /* request */
if (segmented <= EPL_ASND_SDO_CMD_SEGMENTATION_INITIATE_TRANSFER)
{
- index = tvb_get_letohs(tvb, offset);
+ indx = tvb_get_letohs(tvb, offset);
if (epl_tree)
{
- proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_write_by_index_index, tvb, offset, 2, index);
+ proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_write_by_index_index, tvb, offset, 2, indx);
}
offset += 2;
- subindex = tvb_get_guint8(tvb, offset);
+ subindx = tvb_get_guint8(tvb, offset);
if (epl_tree)
{
- proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_write_by_index_subindex, tvb, offset, 1, subindex);
+ proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_write_by_index_subindex, tvb, offset, 1, subindx);
}
offset += 2;
if (check_col(pinfo->cinfo, COL_INFO))
{
- col_append_fstr(pinfo->cinfo, COL_INFO, "Write 0x%04X/%d", index, subindex);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Write 0x%04X/%d", indx, subindx);
}
}
else if (check_col(pinfo->cinfo, COL_INFO))
@@ -1636,30 +1636,30 @@ gint
dissect_epl_sdo_command_read_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 segmented, gboolean response)
{
gint size;
- guint16 index;
- guint8 subindex;
+ guint16 indx;
+ guint8 subindx;
guint32 val;
proto_item* item;
if (!response)
{ /* request */
- index = tvb_get_letohs(tvb, offset);
+ indx = tvb_get_letohs(tvb, offset);
if (epl_tree)
{
- proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_read_by_index_index, tvb, offset, 2, index);
+ proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_read_by_index_index, tvb, offset, 2, indx);
}
offset += 2;
- subindex = tvb_get_guint8(tvb, offset);
+ subindx = tvb_get_guint8(tvb, offset);
if (epl_tree)
{
- proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_read_by_index_subindex, tvb, offset, 1, subindex);
+ proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_read_by_index_subindex, tvb, offset, 1, subindx);
}
offset += 1;
if (check_col(pinfo->cinfo, COL_INFO))
{
- col_append_fstr(pinfo->cinfo, COL_INFO, "Read 0x%04X/%d", index, subindex);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Read 0x%04X/%d", indx, subindx);
}
}
diff --git a/epan/dissectors/packet-gmhdr.c b/epan/dissectors/packet-gmhdr.c
index 51b3dccfbd..82083cbeba 100644
--- a/epan/dissectors/packet-gmhdr.c
+++ b/epan/dissectors/packet-gmhdr.c
@@ -222,7 +222,7 @@ dissect_gmtimestamp_trailer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
guint offset = 0;
guint32 orig_crc, new_crc, comp_crc;
guint16 port_num;
- nstime_t gmtime;
+ nstime_t gmtimev;
struct tm *tm = NULL;
@@ -251,12 +251,12 @@ dissect_gmtimestamp_trailer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
offset += 4;
port_num = tvb_get_ntohs(tvb, offset);
offset += 2;
- gmtime.secs = tvb_get_ntohl(tvb, offset);
+ gmtimev.secs = tvb_get_ntohl(tvb, offset);
offset += 4;
- gmtime.nsecs = tvb_get_ntohl(tvb, offset);
+ gmtimev.nsecs = tvb_get_ntohl(tvb, offset);
- tm = localtime(&gmtime.secs);
- proto_item_append_text(ti, ", Port: %d, Timestamp: %d:%d:%d.%d", port_num, tm->tm_hour, tm->tm_min, tm->tm_sec, gmtime.nsecs);
+ tm = localtime(&gmtimev.secs);
+ proto_item_append_text(ti, ", Port: %d, Timestamp: %d:%d:%d.%d", port_num, tm->tm_hour, tm->tm_min, tm->tm_sec, gmtimev.nsecs);
}
offset = 0;
diff --git a/epan/dissectors/packet-ieee80211-prism.c b/epan/dissectors/packet-ieee80211-prism.c
index f7cbf137f3..9cb1a5fccc 100644
--- a/epan/dissectors/packet-ieee80211-prism.c
+++ b/epan/dissectors/packet-ieee80211-prism.c
@@ -269,7 +269,7 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset;
guint32 msgcode, msglen, did;
guint16 status;
- guint8 *devname;
+ guint8 *devname_p;
offset = 0;
did = 0;
@@ -324,10 +324,10 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(tree) {
proto_tree_add_item(prism_tree, hf_ieee80211_prism_devname, tvb, offset, 16, ENC_ASCII|ENC_NA);
}
- devname = tvb_get_ephemeral_string(tvb, offset, 16);
+ devname_p = tvb_get_ephemeral_string(tvb, offset, 16);
offset += 16;
- col_add_fstr(pinfo->cinfo, COL_INFO, "Device: %s, Message 0x%x, Length %d", devname, msgcode, msglen);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Device: %s, Message 0x%x, Length %d", devname_p, msgcode, msglen);
while(offset < PRISM_HEADER_LENGTH)
diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c
index 49459faae6..8f941fa8f5 100644
--- a/epan/dissectors/packet-mysql.c
+++ b/epan/dissectors/packet-mysql.c
@@ -826,7 +826,7 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
gint protocol;
- gint strlen;
+ gint lenstr;
int ver_offset;
proto_item *tf;
@@ -853,27 +853,27 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset,
offset += 1;
/* version string */
- strlen = tvb_strsize(tvb,offset);
+ lenstr = tvb_strsize(tvb,offset);
if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " version=%s", tvb_get_ephemeral_string(tvb, offset, strlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " version=%s", tvb_get_ephemeral_string(tvb, offset, lenstr));
}
- proto_tree_add_item(greeting_tree, hf_mysql_version, tvb, offset, strlen, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(greeting_tree, hf_mysql_version, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
conn_data->major_version = 0;
- for (ver_offset = 0; ver_offset < strlen; ver_offset++) {
+ for (ver_offset = 0; ver_offset < lenstr; ver_offset++) {
guint8 ver_char = tvb_get_guint8(tvb, offset + ver_offset);
if (ver_char == '.') break;
conn_data->major_version = conn_data->major_version * 10 + ver_char - '0';
}
- offset += strlen;
+ offset += lenstr;
/* 4 bytes little endian thread_id */
proto_tree_add_item(greeting_tree, hf_mysql_thread_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
/* salt string */
- strlen = tvb_strsize(tvb,offset);
- proto_tree_add_item(greeting_tree, hf_mysql_salt, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = tvb_strsize(tvb,offset);
+ proto_tree_add_item(greeting_tree, hf_mysql_salt, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
/* rest is optional */
if (!tvb_reported_length_remaining(tvb, offset)) return offset;
@@ -895,9 +895,9 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset,
/* 4.1+ server: rest of salt */
if (tvb_reported_length_remaining(tvb, offset)) {
- strlen = tvb_strsize(tvb,offset);
- proto_tree_add_item(greeting_tree, hf_mysql_salt2, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = tvb_strsize(tvb,offset);
+ proto_tree_add_item(greeting_tree, hf_mysql_salt2, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
}
return offset;
@@ -908,7 +908,7 @@ static int
mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
- gint strlen;
+ gint lenstr;
proto_item *tf;
proto_item *login_tree= NULL;
@@ -941,41 +941,41 @@ mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset,
}
/* User name */
- strlen = my_tvb_strsize(tvb, offset);
+ lenstr = my_tvb_strsize(tvb, offset);
if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " user=%s", tvb_get_ephemeral_string(tvb, offset, strlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " user=%s", tvb_get_ephemeral_string(tvb, offset, lenstr));
}
- proto_tree_add_item(login_tree, hf_mysql_user, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ proto_tree_add_item(login_tree, hf_mysql_user, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
/* rest is optional */
if (!tvb_reported_length_remaining(tvb, offset)) return offset;
/* password: asciiz or length+ascii */
if (conn_data->clnt_caps & MYSQL_CAPS_SC) {
- strlen = tvb_get_guint8(tvb, offset);
+ lenstr = tvb_get_guint8(tvb, offset);
offset += 1;
} else {
- strlen = my_tvb_strsize(tvb, offset);
+ lenstr = my_tvb_strsize(tvb, offset);
}
- if (tree && strlen > 1) {
- proto_tree_add_item(login_tree, hf_mysql_passwd, tvb, offset, strlen, ENC_NA);
+ if (tree && lenstr > 1) {
+ proto_tree_add_item(login_tree, hf_mysql_passwd, tvb, offset, lenstr, ENC_NA);
}
- offset += strlen;
+ offset += lenstr;
/* optional: initial schema */
if (conn_data->clnt_caps & MYSQL_CAPS_CD)
{
- strlen= my_tvb_strsize(tvb,offset);
- if(strlen<0){
+ lenstr= my_tvb_strsize(tvb,offset);
+ if(lenstr<0){
return offset;
}
if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " db=%s", tvb_get_ephemeral_string(tvb, offset, strlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " db=%s", tvb_get_ephemeral_string(tvb, offset, lenstr));
}
- proto_tree_add_item(login_tree, hf_mysql_schema, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ proto_tree_add_item(login_tree, hf_mysql_schema, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
}
return offset;
@@ -1169,7 +1169,7 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
gint opcode;
- gint strlen;
+ gint lenstr;
proto_item *tf = NULL, *ti;
proto_item *req_tree = NULL;
guint32 stmt_id;
@@ -1211,27 +1211,27 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
case MYSQL_INIT_DB:
case MYSQL_CREATE_DB:
case MYSQL_DROP_DB:
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
conn_data->state = RESPONSE_OK;
break;
case MYSQL_QUERY:
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, strlen, ENC_ASCII|ENC_NA);
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
if (mysql_showquery) {
if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO, " { %s } ", tvb_get_ephemeral_string(tvb, offset, strlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " { %s } ", tvb_get_ephemeral_string(tvb, offset, lenstr));
}
- offset += strlen;
+ offset += lenstr;
conn_data->state = RESPONSE_TABULAR;
break;
case MYSQL_STMT_PREPARE:
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
conn_data->state = RESPONSE_PREPARE;
break;
@@ -1248,9 +1248,9 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
break;
case MYSQL_FIELD_LIST:
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_table_name, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_table_name, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
conn_data->state = RESPONSE_SHOW_FIELDS;
break;
@@ -1261,17 +1261,17 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
break;
case MYSQL_CHANGE_USER:
- strlen = tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_user, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_user, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
- strlen = tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_passwd, tvb, offset, strlen, ENC_NA);
- offset += strlen;
+ lenstr = tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_passwd, tvb, offset, lenstr, ENC_NA);
+ offset += lenstr;
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
conn_data->state= RESPONSE_OK;
break;
@@ -1335,11 +1335,11 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
offset += 2;
/* rest is data */
- strlen = tvb_reported_length_remaining(tvb, offset);
- if (tree && strlen > 0) {
- proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, strlen, ENC_NA);
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ if (tree && lenstr > 0) {
+ proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, lenstr, ENC_NA);
}
- offset += strlen;
+ offset += lenstr;
conn_data->state = REQUEST;
break;
@@ -1377,23 +1377,23 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
}
}
} else {
- strlen = tvb_reported_length_remaining(tvb, offset);
- if (tree && strlen > 0) {
- ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, strlen, ENC_NA);
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ if (tree && lenstr > 0) {
+ ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, lenstr, ENC_NA);
expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN,
"PREPARE Response packet is needed to dissect the payload");
}
- offset += strlen;
+ offset += lenstr;
}
#if 0
/* FIXME: rest needs metadata about statement */
#else
- strlen = tvb_reported_length_remaining(tvb, offset);
- if (tree && strlen > 0) {
- ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, strlen, ENC_NA);
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ if (tree && lenstr > 0) {
+ ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, lenstr, ENC_NA);
expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN, "FIXME: execute dissector incomplete");
}
- offset += strlen;
+ offset += lenstr;
#endif
conn_data->state= RESPONSE_TABULAR;
break;
@@ -1409,11 +1409,11 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
offset += 4;
/* binlog file name ? */
- strlen = tvb_reported_length_remaining(tvb, offset);
- if (tree && strlen > 0) {
- proto_tree_add_item(req_tree, hf_mysql_binlog_file_name, tvb, offset, strlen, ENC_ASCII|ENC_NA);
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ if (tree && lenstr > 0) {
+ proto_tree_add_item(req_tree, hf_mysql_binlog_file_name, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
}
- offset += strlen;
+ offset += lenstr;
conn_data->state = REQUEST;
break;
@@ -1443,7 +1443,7 @@ mysql_dissect_response(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
gint response_code;
- gint strlen;
+ gint lenstr;
gint server_status = 0;
proto_item *ti;
@@ -1504,9 +1504,9 @@ mysql_dissect_response(tvbuff_t *tvb, packet_info *pinfo, int offset,
else {
switch (conn_data->state) {
case RESPONSE_MESSAGE:
- if ((strlen = tvb_reported_length_remaining(tvb, offset))) {
- proto_tree_add_item(tree, hf_mysql_message, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ if ((lenstr = tvb_reported_length_remaining(tvb, offset))) {
+ proto_tree_add_item(tree, hf_mysql_message, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
}
conn_data->state = REQUEST;
break;
@@ -1570,7 +1570,7 @@ static int
mysql_dissect_ok_packet(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
- gint strlen;
+ gint lenstr;
guint64 affected_rows;
guint64 insert_id;
int fle;
@@ -1599,9 +1599,9 @@ mysql_dissect_ok_packet(tvbuff_t *tvb, packet_info *pinfo, int offset,
/* optional: message string */
if (tvb_reported_length_remaining(tvb, offset) > 0) {
- strlen = tvb_reported_length_remaining(tvb, offset);
- proto_tree_add_item(tree, hf_mysql_message, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ proto_tree_add_item(tree, hf_mysql_message, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
}
conn_data->state = REQUEST;
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index b957c120a7..cc832a2e06 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -551,25 +551,25 @@ radius_decrypt_avp(gchar *dest,int dest_len,tvbuff_t *tvb,int offset,int length)
void radius_integer(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
- guint32 uint;
+ guint32 uintv;
switch (len) {
case 1:
- uint = tvb_get_guint8(tvb,offset);
+ uintv = tvb_get_guint8(tvb,offset);
break;
case 2:
- uint = tvb_get_ntohs(tvb,offset);
+ uintv = tvb_get_ntohs(tvb,offset);
break;
case 3:
- uint = tvb_get_ntoh24(tvb,offset);
+ uintv = tvb_get_ntoh24(tvb,offset);
break;
case 4:
- uint = tvb_get_ntohl(tvb,offset);
+ uintv = tvb_get_ntohl(tvb,offset);
break;
case 8: {
- guint64 uint64 = tvb_get_ntoh64(tvb,offset);
- proto_tree_add_uint64(tree,a->hf_alt,tvb,offset,len,uint64);
- proto_item_append_text(avp_item, "%" G_GINT64_MODIFIER "u", uint64);
+ guint64 uintv64 = tvb_get_ntoh64(tvb,offset);
+ proto_tree_add_uint64(tree,a->hf_alt,tvb,offset,len,uintv64);
+ proto_item_append_text(avp_item, "%" G_GINT64_MODIFIER "u", uintv64);
return;
}
default:
@@ -579,32 +579,32 @@ void radius_integer(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo
proto_tree_add_item(tree,a->hf,tvb, offset, len, ENC_BIG_ENDIAN);
if (a->vs) {
- proto_item_append_text(avp_item, "%s(%u)", val_to_str_const(uint, a->vs, "Unknown"),uint);
+ proto_item_append_text(avp_item, "%s(%u)", val_to_str_const(uintv, a->vs, "Unknown"),uintv);
} else {
- proto_item_append_text(avp_item, "%u", uint);
+ proto_item_append_text(avp_item, "%u", uintv);
}
}
void radius_signed(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
- guint32 uint;
+ guint32 uintv;
switch (len) {
case 1:
- uint = tvb_get_guint8(tvb,offset);
+ uintv = tvb_get_guint8(tvb,offset);
break;
case 2:
- uint = tvb_get_ntohs(tvb,offset);
+ uintv = tvb_get_ntohs(tvb,offset);
break;
case 3:
- uint = tvb_get_ntoh24(tvb,offset);
+ uintv = tvb_get_ntoh24(tvb,offset);
break;
case 4:
- uint = tvb_get_ntohl(tvb,offset);
+ uintv = tvb_get_ntohl(tvb,offset);
break;
case 8: {
- guint64 uint64 = tvb_get_ntoh64(tvb,offset);
- proto_tree_add_int64(tree,a->hf_alt,tvb,offset,len,uint64);
- proto_item_append_text(avp_item, "%" G_GINT64_MODIFIER "u", uint64);
+ guint64 uintv64 = tvb_get_ntoh64(tvb,offset);
+ proto_tree_add_int64(tree,a->hf_alt,tvb,offset,len,uintv64);
+ proto_item_append_text(avp_item, "%" G_GINT64_MODIFIER "u", uintv64);
return;
}
default:
@@ -612,12 +612,12 @@ void radius_signed(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _
return;
}
- proto_tree_add_int(tree,a->hf,tvb,offset,len,uint);
+ proto_tree_add_int(tree,a->hf,tvb,offset,len,uintv);
if (a->vs) {
- proto_item_append_text(avp_item, "%s(%d)", val_to_str_const(uint, a->vs, "Unknown"),uint);
+ proto_item_append_text(avp_item, "%s(%d)", val_to_str_const(uintv, a->vs, "Unknown"),uintv);
} else {
- proto_item_append_text(avp_item, "%d", uint);
+ proto_item_append_text(avp_item, "%d", uintv);
}
}
diff --git a/epan/dissectors/packet-reload-framing.c b/epan/dissectors/packet-reload-framing.c
index 2ca74a9254..2e659dceeb 100644
--- a/epan/dissectors/packet-reload-framing.c
+++ b/epan/dissectors/packet-reload-framing.c
@@ -347,23 +347,23 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
{
guint32 received;
int last_received = -1;
- int index = 0;
+ int indx = 0;
proto_tree *received_tree;
proto_item *ti_parsed_received = NULL;
received = tvb_get_ntohl(tvb, offset);
- while ((received<<index) != 0) {
- if (index>=32) break;
- if (received &(0x1<<(31-index))) {
- if (index==0) {
+ while ((received<<indx) != 0) {
+ if (indx>=32) break;
+ if (received &(0x1<<(31-indx))) {
+ if (indx==0) {
received_tree = proto_item_add_subtree(ti_received, ett_reload_framing_received);
ti_parsed_received = proto_tree_add_item(received_tree, hf_reload_framing_parsed_received, tvb, offset, 4, ENC_NA);
- proto_item_append_text(ti_parsed_received, "[%u", (sequence -32+index));
- last_received = index;
+ proto_item_append_text(ti_parsed_received, "[%u", (sequence -32+indx));
+ last_received = indx;
}
else {
- if (received &(0x1<<(31-index+1))) {
- index++;
+ if (received &(0x1<<(31-indx+1))) {
+ indx++;
/* range: skip */
continue;
}
@@ -373,43 +373,43 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* 1st acked ever */
received_tree = proto_item_add_subtree(ti_received, ett_reload_framing_received);
ti_parsed_received = proto_tree_add_item(received_tree, hf_reload_framing_parsed_received, tvb, offset, 4, ENC_NA);
- proto_item_append_text(ti_parsed_received, "[%u",(sequence-32+index));
+ proto_item_append_text(ti_parsed_received, "[%u",(sequence-32+indx));
}
else {
- proto_item_append_text(ti_parsed_received, ",%u",(sequence-32+index));
+ proto_item_append_text(ti_parsed_received, ",%u",(sequence-32+indx));
}
- last_received = index;
+ last_received = indx;
}
}
}
- else if (index>0) {
- if ((received &(0x1<<(31-index+1))) && (received &(0x1<<(31-index+2)))) {
+ else if (indx>0) {
+ if ((received &(0x1<<(31-indx+1))) && (received &(0x1<<(31-indx+2)))) {
/* end of a series */
- if ((received &(0x1<<(31-index+3)))) {
- proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+index-1));
+ if ((received &(0x1<<(31-indx+3)))) {
+ proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+indx-1));
}
else {
/* just a pair */
- proto_item_append_text(ti_received, ",%u", (sequence-32+index-1));
+ proto_item_append_text(ti_received, ",%u", (sequence-32+indx-1));
}
}
else {
- index++;
+ indx++;
continue;
}
}
- index++;
+ indx++;
}
if (last_received>=0) {
- if ((received &(0x1<<(31-index+1))) && (received &(0x1<<(31-index+2)))) {
+ if ((received &(0x1<<(31-indx+1))) && (received &(0x1<<(31-indx+2)))) {
/* end of a series */
- if ((received &(0x1<<(31-index+3)))) {
- proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+index-1));
+ if ((received &(0x1<<(31-indx+3)))) {
+ proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+indx-1));
}
else {
/* just a pair */
- proto_item_append_text(ti_parsed_received, ",%u", (sequence-32+index-1));
+ proto_item_append_text(ti_parsed_received, ",%u", (sequence-32+indx-1));
}
}
proto_item_append_text(ti_parsed_received, "]");
diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c
index 7a662d108c..4ee8469f4c 100644
--- a/epan/dissectors/packet-reload.c
+++ b/epan/dissectors/packet-reload.c
@@ -3528,14 +3528,14 @@ extern gint dissect_reload_messagecontents(tvbuff_t *tvb, packet_info *pinfo, pr
local_tree = proto_item_add_subtree(ti_local, ett_reload_pingans);
proto_tree_add_item(local_tree, hf_reload_ping_response_id, tvb, offset, 8, ENC_BIG_ENDIAN);
{
- guint64 time;
+ guint64 timev;
guint32 remaining_ms;
time_t time_sec;
nstime_t l_nsTime;
- time = tvb_get_ntoh64(tvb, offset+8);
- time_sec = (time_t)time/1000;
- remaining_ms = (guint32)(time % 1000);
+ timev = tvb_get_ntoh64(tvb, offset+8);
+ time_sec = (time_t)timev/1000;
+ remaining_ms = (guint32)(timev % 1000);
l_nsTime.secs = time_sec;
l_nsTime.nsecs = remaining_ms*1000*1000;
diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c
index 587d160dc4..fab75c4da4 100644
--- a/epan/dissectors/packet-rlc.c
+++ b/epan/dissectors/packet-rlc.c
@@ -1401,7 +1401,7 @@ rlc_decipher_tvb(tvbuff_t *tvb, packet_info *pinfo, guint32 counter, guint8 rbid
for(i = 0; i< tvb_length(tvb)-header_size; i++ ){
out[i+header_size] = tvb_get_guint8(tvb, header_size+i);
}
- /*Call KASUMI confidentiality function, note that rbid is zero indexed*/
+ /*Call KASUMI confidentiality function, note that rbid is zero indxed*/
f8( key_in, counter, rbid-1, dir, &out[header_size], (tvb_length(tvb)-header_size)*8 );
/*Restore header in tvb*/
@@ -1459,10 +1459,10 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
rlc_info * rlcinf, guint16 seq, enum rlc_mode mode)
{
rrc_ciphering_info * c_inf;
- guint8 index, header_size, hfn_shift;
+ guint8 indx, header_size, hfn_shift;
gint16 pos;
- index = fpinf->is_uplink ? 1 : 0;
+ indx = fpinf->is_uplink ? 1 : 0;
pos = fpinf->cur_tb;
if (mode ==RLC_UM) {
header_size = 1;
@@ -1477,13 +1477,13 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
/*TODO: This doesnt really work for all packets..*/
/*Check if we have ciphering info and that this frame is ciphered*/
- if(c_inf!=NULL && ( (c_inf->setup_frame > 0 && c_inf->setup_frame < pinfo->fd->num && c_inf->seq_no[rlcinf->rbid[pos]][index] == -1) ||
- (c_inf->setup_frame < pinfo->fd->num && c_inf->seq_no[rlcinf->rbid[pos]][index] >= 0 && c_inf->seq_no[rlcinf->rbid[pos]][index] <= seq) )){
+ if(c_inf!=NULL && ( (c_inf->setup_frame > 0 && c_inf->setup_frame < pinfo->fd->num && c_inf->seq_no[rlcinf->rbid[pos]][indx] == -1) ||
+ (c_inf->setup_frame < pinfo->fd->num && c_inf->seq_no[rlcinf->rbid[pos]][indx] >= 0 && c_inf->seq_no[rlcinf->rbid[pos]][indx] <= seq) )){
tvbuff_t *t;
/*Check if this counter has been initialized*/
- if(!counter_init[rlcinf->rbid[pos]][index] ){
+ if(!counter_init[rlcinf->rbid[pos]][indx] ){
guint32 frame_num = pinfo->fd->num;
/*Initializes counter*/
@@ -1493,7 +1493,7 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
g_tree_foreach(c_inf->start_ps, (GTraverseFunc)iter_same, &frame_num);
/*Set COUNTER value accordingly as specified by 6.4.8 in 3GPP TS 33.102 */
- if(max_counter +2 > frame_num && c_inf->seq_no[rlcinf->rbid[pos]][index] == -1){
+ if(max_counter +2 > frame_num && c_inf->seq_no[rlcinf->rbid[pos]][indx] == -1){
ps_counter[rlcinf->rbid[pos]][0] = (max_counter+2) << hfn_shift;
ps_counter[rlcinf->rbid[pos]][1] = (max_counter+2) << hfn_shift;
}else{
@@ -1512,7 +1512,7 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
}
/*Update the maximal COUNTER value seen so far*/
- max_counter = MAX(max_counter,((ps_counter[rlcinf->rbid[pos]][index]) | seq) >> hfn_shift);
+ max_counter = MAX(max_counter,((ps_counter[rlcinf->rbid[pos]][indx]) | seq) >> hfn_shift);
/*XXX:Since RBID in umts isnt configured properly..*/
if(rlcinf->rbid[pos] == 9 ){
@@ -1522,9 +1522,9 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
frame_num[0] = pinfo->fd->num;
/*Find the correct counter value*/
g_tree_foreach(counter_map, (GTraverseFunc)rlc_find_old_counter, &frame_num[0]);
- t = rlc_decipher_tvb(tvb, pinfo, (frame_num[index+1] | seq),16,!fpinf->is_uplink,header_size);
+ t = rlc_decipher_tvb(tvb, pinfo, (frame_num[indx+1] | seq),16,!fpinf->is_uplink,header_size);
}else{
- t = rlc_decipher_tvb(tvb, pinfo, ((ps_counter[rlcinf->rbid[pos]][index]) | seq),16,!fpinf->is_uplink,header_size);
+ t = rlc_decipher_tvb(tvb, pinfo, ((ps_counter[rlcinf->rbid[pos]][indx]) | seq),16,!fpinf->is_uplink,header_size);
}
}else{
if(tree){
@@ -1532,15 +1532,15 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
guint32 frame_num[3];
frame_num[0] = pinfo->fd->num;
g_tree_foreach(counter_map, (GTraverseFunc)rlc_find_old_counter, &frame_num[0]);
- t = rlc_decipher_tvb(tvb, pinfo, (frame_num[index+1] | seq),rlcinf->rbid[pos],!fpinf->is_uplink,header_size);
+ t = rlc_decipher_tvb(tvb, pinfo, (frame_num[indx+1] | seq),rlcinf->rbid[pos],!fpinf->is_uplink,header_size);
}else
- t = rlc_decipher_tvb(tvb, pinfo, ((ps_counter[rlcinf->rbid[pos]][index]) | seq),rlcinf->rbid[pos],!fpinf->is_uplink,header_size);
+ t = rlc_decipher_tvb(tvb, pinfo, ((ps_counter[rlcinf->rbid[pos]][indx]) | seq),rlcinf->rbid[pos],!fpinf->is_uplink,header_size);
}
/*Update the hyperframe number*/
if(seq == 4095){
- ps_counter[rlcinf->rbid[pos]][index] += 1 << hfn_shift;
+ ps_counter[rlcinf->rbid[pos]][indx] += 1 << hfn_shift;
if(!tree){/*Preserve counter for second packet analysis run*/
guint32 * ciph;
diff --git a/epan/dissectors/packet-sbus.c b/epan/dissectors/packet-sbus.c
index 9c472fe1b3..4904574ae6 100644
--- a/epan/dissectors/packet-sbus.c
+++ b/epan/dissectors/packet-sbus.c
@@ -549,11 +549,11 @@ static GHashTable *sbus_request_hash = NULL;
static guint crc_calc (guint crc, guint val)
{
- int index;
+ int indx;
guint ncrc;
- index = (((crc >> 8) ^ val) & 0xff);
- ncrc = crc_table[index] ^ ((crc << 8) & 0xffff);
+ indx = (((crc >> 8) ^ val) & 0xff);
+ ncrc = crc_table[indx] ^ ((crc << 8) & 0xffff);
return ncrc;
}
diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c
index 76c785473e..111d6dfb8d 100644
--- a/epan/dissectors/packet-sna.c
+++ b/epan/dissectors/packet-sna.c
@@ -1197,15 +1197,15 @@ dissect_nlp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *nlp_item, *bf_item;
guint8 nhdr_0, nhdr_1, nhdr_x, thdr_8, thdr_9, fid;
guint32 thdr_len, thdr_dlf;
- guint16 subindex;
+ guint16 subindx;
- int index = 0, counter = 0;
+ int indx = 0, counter = 0;
nlp_tree = NULL;
nlp_item = NULL;
- nhdr_0 = tvb_get_guint8(tvb, index);
- nhdr_1 = tvb_get_guint8(tvb, index+1);
+ nhdr_0 = tvb_get_guint8(tvb, indx);
+ nhdr_1 = tvb_get_guint8(tvb, indx+1);
col_set_str(pinfo->cinfo, COL_INFO, "HPR NLP Packet");
@@ -1213,177 +1213,177 @@ dissect_nlp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Don't bother setting length. We'll set it later after we
* find the lengths of NHDR */
nlp_item = proto_tree_add_item(tree, hf_sna_nlp_nhdr, tvb,
- index, -1, ENC_NA);
+ indx, -1, ENC_NA);
nlp_tree = proto_item_add_subtree(nlp_item, ett_sna_nlp_nhdr);
bf_item = proto_tree_add_uint(nlp_tree, hf_sna_nlp_nhdr_0, tvb,
- index, 1, nhdr_0);
+ indx, 1, nhdr_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_nlp_nhdr_0);
- proto_tree_add_uint(bf_tree, hf_sna_nlp_sm, tvb, index, 1,
+ proto_tree_add_uint(bf_tree, hf_sna_nlp_sm, tvb, indx, 1,
nhdr_0);
- proto_tree_add_uint(bf_tree, hf_sna_nlp_tpf, tvb, index, 1,
+ proto_tree_add_uint(bf_tree, hf_sna_nlp_tpf, tvb, indx, 1,
nhdr_0);
bf_item = proto_tree_add_uint(nlp_tree, hf_sna_nlp_nhdr_1, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_nlp_nhdr_1);
proto_tree_add_uint(bf_tree, hf_sna_nlp_ft, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_tspi, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_slowdn1, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_slowdn2, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
}
/* ANR or FR lists */
- index += 2;
+ indx += 2;
counter = 0;
if ((nhdr_0 & 0xe0) == 0xa0) {
do {
- nhdr_x = tvb_get_guint8(tvb, index + counter);
+ nhdr_x = tvb_get_guint8(tvb, indx + counter);
counter ++;
} while (nhdr_x != 0xff);
if (tree)
proto_tree_add_item(nlp_tree,
- hf_sna_nlp_fra, tvb, index, counter, ENC_NA);
- index += counter;
+ hf_sna_nlp_fra, tvb, indx, counter, ENC_NA);
+ indx += counter;
if (tree)
- proto_tree_add_text(nlp_tree, tvb, index, 1,
+ proto_tree_add_text(nlp_tree, tvb, indx, 1,
"Reserved");
- index++;
+ indx++;
if (tree)
- proto_item_set_len(nlp_item, index);
+ proto_item_set_len(nlp_item, indx);
if ((nhdr_1 & 0xf0) == 0x10) {
- nhdr_x = tvb_get_guint8(tvb, index);
+ nhdr_x = tvb_get_guint8(tvb, indx);
if (tree)
proto_tree_add_uint(tree, hf_sna_nlp_frh,
- tvb, index, 1, nhdr_x);
- index ++;
+ tvb, indx, 1, nhdr_x);
+ indx ++;
- if (tvb_offset_exists(tvb, index))
+ if (tvb_offset_exists(tvb, indx))
call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, index),
+ tvb_new_subset_remaining(tvb, indx),
pinfo, parent_tree);
return;
}
}
if ((nhdr_0 & 0xe0) == 0xc0) {
do {
- nhdr_x = tvb_get_guint8(tvb, index + counter);
+ nhdr_x = tvb_get_guint8(tvb, indx + counter);
counter ++;
} while (nhdr_x != 0xff);
if (tree)
proto_tree_add_item(nlp_tree, hf_sna_nlp_anr,
- tvb, index, counter, ENC_NA);
- index += counter;
+ tvb, indx, counter, ENC_NA);
+ indx += counter;
if (tree)
- proto_tree_add_text(nlp_tree, tvb, index, 1,
+ proto_tree_add_text(nlp_tree, tvb, indx, 1,
"Reserved");
- index++;
+ indx++;
if (tree)
- proto_item_set_len(nlp_item, index);
+ proto_item_set_len(nlp_item, indx);
}
- thdr_8 = tvb_get_guint8(tvb, index+8);
- thdr_9 = tvb_get_guint8(tvb, index+9);
- thdr_len = tvb_get_ntohs(tvb, index+10);
- thdr_dlf = tvb_get_ntohl(tvb, index+12);
+ thdr_8 = tvb_get_guint8(tvb, indx+8);
+ thdr_9 = tvb_get_guint8(tvb, indx+9);
+ thdr_len = tvb_get_ntohs(tvb, indx+10);
+ thdr_dlf = tvb_get_ntohl(tvb, indx+12);
if (tree) {
nlp_item = proto_tree_add_item(tree, hf_sna_nlp_thdr, tvb,
- index, thdr_len << 2, ENC_NA);
+ indx, thdr_len << 2, ENC_NA);
nlp_tree = proto_item_add_subtree(nlp_item, ett_sna_nlp_thdr);
proto_tree_add_item(nlp_tree, hf_sna_nlp_tcid, tvb,
- index, 8, ENC_NA);
+ indx, 8, ENC_NA);
bf_item = proto_tree_add_uint(nlp_tree, hf_sna_nlp_thdr_8, tvb,
- index+8, 1, thdr_8);
+ indx+8, 1, thdr_8);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_nlp_thdr_8);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_setupi, tvb,
- index+8, 1, thdr_8);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_somi, tvb, index+8,
+ indx+8, 1, thdr_8);
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_somi, tvb, indx+8,
1, thdr_8);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_eomi, tvb, index+8,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_eomi, tvb, indx+8,
1, thdr_8);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_sri, tvb, index+8,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_sri, tvb, indx+8,
1, thdr_8);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_rasapi, tvb,
- index+8, 1, thdr_8);
+ indx+8, 1, thdr_8);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_retryi, tvb,
- index+8, 1, thdr_8);
+ indx+8, 1, thdr_8);
bf_item = proto_tree_add_uint(nlp_tree, hf_sna_nlp_thdr_9, tvb,
- index+9, 1, thdr_9);
+ indx+9, 1, thdr_9);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_nlp_thdr_9);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_lmi, tvb, index+9,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_lmi, tvb, indx+9,
1, thdr_9);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_cqfi, tvb, index+9,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_cqfi, tvb, indx+9,
1, thdr_9);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_osi, tvb, index+9,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_osi, tvb, indx+9,
1, thdr_9);
- proto_tree_add_uint(nlp_tree, hf_sna_nlp_offset, tvb, index+10,
+ proto_tree_add_uint(nlp_tree, hf_sna_nlp_offset, tvb, indx+10,
2, thdr_len);
- proto_tree_add_uint(nlp_tree, hf_sna_nlp_dlf, tvb, index+12,
+ proto_tree_add_uint(nlp_tree, hf_sna_nlp_dlf, tvb, indx+12,
4, thdr_dlf);
- proto_tree_add_item(nlp_tree, hf_sna_nlp_bsn, tvb, index+16,
+ proto_tree_add_item(nlp_tree, hf_sna_nlp_bsn, tvb, indx+16,
4, ENC_BIG_ENDIAN);
}
- subindex = 20;
+ subindx = 20;
- if (((thdr_9 & 0x18) == 0x08) && ((thdr_len << 2) > subindex)) {
- counter = tvb_get_guint8(tvb, index + subindex);
- if (tvb_get_guint8(tvb, index+subindex+1) == 5)
- dissect_control(tvb, index + subindex, counter+2, nlp_tree, 1, LT);
+ if (((thdr_9 & 0x18) == 0x08) && ((thdr_len << 2) > subindx)) {
+ counter = tvb_get_guint8(tvb, indx + subindx);
+ if (tvb_get_guint8(tvb, indx+subindx+1) == 5)
+ dissect_control(tvb, indx + subindx, counter+2, nlp_tree, 1, LT);
else
call_dissector(data_handle,
- tvb_new_subset(tvb, index + subindex, counter+2,
+ tvb_new_subset(tvb, indx + subindx, counter+2,
-1), pinfo, nlp_tree);
- subindex += (counter+2);
+ subindx += (counter+2);
}
- if ((thdr_9 & 0x04) && ((thdr_len << 2) > subindex))
+ if ((thdr_9 & 0x04) && ((thdr_len << 2) > subindx))
dissect_optional(
- tvb_new_subset(tvb, index + subindex,
- (thdr_len << 2) - subindex, -1),
+ tvb_new_subset(tvb, indx + subindx,
+ (thdr_len << 2) - subindx, -1),
pinfo, nlp_tree);
- index += (thdr_len << 2);
+ indx += (thdr_len << 2);
if (((thdr_8 & 0x20) == 0) && thdr_dlf) {
col_set_str(pinfo->cinfo, COL_INFO, "HPR Fragment");
- if (tvb_offset_exists(tvb, index)) {
+ if (tvb_offset_exists(tvb, indx)) {
call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, index), pinfo,
+ tvb_new_subset_remaining(tvb, indx), pinfo,
parent_tree);
}
return;
}
- if (tvb_offset_exists(tvb, index)) {
+ if (tvb_offset_exists(tvb, indx)) {
/* Transmission Header Format Identifier */
- fid = hi_nibble(tvb_get_guint8(tvb, index));
+ fid = hi_nibble(tvb_get_guint8(tvb, indx));
if (fid == 5) /* Only FID5 allowed for HPR */
- dissect_fid(tvb_new_subset_remaining(tvb, index), pinfo,
+ dissect_fid(tvb_new_subset_remaining(tvb, indx), pinfo,
tree, parent_tree);
else {
- if (tvb_get_ntohs(tvb, index+2) == 0x12ce) {
+ if (tvb_get_ntohs(tvb, indx+2) == 0x12ce) {
/* Route Setup */
col_set_str(pinfo->cinfo, COL_INFO, "HPR Route Setup");
- dissect_gds(tvb_new_subset_remaining(tvb, index),
+ dissect_gds(tvb_new_subset_remaining(tvb, indx),
pinfo, tree, parent_tree);
} else
call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, index),
+ tvb_new_subset_remaining(tvb, indx),
pinfo, parent_tree);
}
}
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index ba4ec1619d..05ab2f9ea8 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -2603,7 +2603,7 @@ dissect_tcpopt_mptcp(const ip_tcp_opt *optp _U_, tvbuff_t *tvb,
proto_tree *mptcp_flags_tree;
guint8 subtype;
- guint8 index;
+ guint8 indx;
guint8 flags;
guint8 ipver;
@@ -2710,7 +2710,7 @@ dissect_tcpopt_mptcp(const ip_tcp_opt *optp _U_, tvbuff_t *tvb,
case 24:
offset += 2;
- for (index = 0; index < 5; index++) {
+ for (indx = 0; indx < 5; indx++) {
proto_tree_add_item(mptcp_tree,
hf_tcp_option_mptcp_sender_mac, tvb, offset,
4, ENC_BIG_ENDIAN);
diff --git a/epan/dissectors/packet-xmpp.c b/epan/dissectors/packet-xmpp.c
index bd74a05aa5..8e22faa6e3 100644
--- a/epan/dissectors/packet-xmpp.c
+++ b/epan/dissectors/packet-xmpp.c
@@ -377,23 +377,23 @@ dissect_xmpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
/*check if desegment
* now it checks that last char is '>',
* TODO checks that first element in packet is closed*/
- int index;
+ int indx;
gchar last_char;
if (xmpp_desegment)
{
- index = tvb_reported_length(tvb) - 1;
- if (index >= 0)
+ indx = tvb_reported_length(tvb) - 1;
+ if (indx >= 0)
{
- last_char = tvb_get_guint8(tvb, index);
+ last_char = tvb_get_guint8(tvb, indx);
- while ((last_char <= ' ') && (index - 1 >= 0))
+ while ((last_char <= ' ') && (indx - 1 >= 0))
{
- index--;
- last_char = tvb_get_guint8(tvb, index);
+ indx--;
+ last_char = tvb_get_guint8(tvb, indx);
}
- if ((index >= 0) && (last_char != '>'))
+ if ((indx >= 0) && (last_char != '>'))
{
pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
return;
diff --git a/epan/follow.c b/epan/follow.c
index c27ba5afc9..859d5f4205 100644
--- a/epan/follow.c
+++ b/epan/follow.c
@@ -181,16 +181,16 @@ follow_tcp_addr(const address *addr0, guint port0,
return TRUE;
}
-/* select a tcp stream to follow via it's index */
+/* select a tcp stream to follow via its index */
gboolean
-follow_tcp_index(guint32 index)
+follow_tcp_index(guint32 indx)
{
if (find_tcp_index || find_tcp_addr) {
return FALSE;
}
find_tcp_addr = TRUE;
- tcp_stream_to_follow = index;
+ tcp_stream_to_follow = indx;
memset(ip_address, 0, sizeof ip_address);
port[0] = port[1] = 0;
diff --git a/epan/radius_dict.l b/epan/radius_dict.l
index 9129471b45..11c6c80324 100644
--- a/epan/radius_dict.l
+++ b/epan/radius_dict.l
@@ -337,7 +337,7 @@ static void add_vendor(const gchar* name, guint32 id, guint type_octets, guint l
g_hash_table_insert(dict->vendors_by_name, (gpointer) v->name, v);
}
-static void add_attribute(const gchar* name, const gchar* codestr, radius_attr_dissector_t type, const gchar* vendor, guint crypt, gboolean tagged, const gchar* attr) {
+static void add_attribute(const gchar* name, const gchar* codestr, radius_attr_dissector_t type, const gchar* vendor, guint encrypted_flag, gboolean tagged, const gchar* attr) {
radius_attr_info_t* a;
GHashTable* by_id;
guint32 code;
@@ -376,7 +376,7 @@ static void add_attribute(const gchar* name, const gchar* codestr, radius_attr_
}
a->code = code;
- a->encrypt = crypt;
+ a->encrypt = encrypted_flag;
a->tagged = tagged;
a->type = type;
a->vs = NULL;
diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c
index 5fecb5ea85..7698ee7225 100644
--- a/epan/wslua/wslua_pinfo.c
+++ b/epan/wslua/wslua_pinfo.c
@@ -76,14 +76,14 @@ WSLUA_CONSTRUCTOR NSTime_new(lua_State *L) {
/* Creates a new NSTime object */
#define WSLUA_OPTARG_NSTime_new_SECONDS 1 /* Seconds */
#define WSLUA_OPTARG_NSTime_new_NSECONDS 2 /* Nano seconds */
- NSTime time = g_malloc(sizeof(nstime_t));
+ NSTime nstime = g_malloc(sizeof(nstime_t));
- if (!time) return 0;
+ if (!nstime) return 0;
- time->secs = (time_t) luaL_optint(L,WSLUA_OPTARG_NSTime_new_SECONDS,0);
- time->nsecs = luaL_optint(L,WSLUA_OPTARG_NSTime_new_NSECONDS,0);
+ nstime->secs = (time_t) luaL_optint(L,WSLUA_OPTARG_NSTime_new_SECONDS,0);
+ nstime->nsecs = luaL_optint(L,WSLUA_OPTARG_NSTime_new_NSECONDS,0);
- pushNSTime(L,time);
+ pushNSTime(L,nstime);
WSLUA_RETURN(1); /* The new NSTime object. */
}
@@ -185,36 +185,36 @@ typedef struct {
} nstime_actions_t;
static int NSTime_get_secs(lua_State* L) {
- NSTime time = toNSTime(L,1);
+ NSTime nstime = toNSTime(L,1);
- lua_pushnumber (L,(lua_Number)(time->secs));
+ lua_pushnumber (L,(lua_Number)(nstime->secs));
return 1;
}
static int NSTime_set_secs(lua_State* L)
{
- NSTime time = toNSTime(L,1);
+ NSTime nstime = toNSTime(L,1);
time_t secs = luaL_checkint(L,3);
- time->secs = secs;
+ nstime->secs = secs;
return 0;
}
static int NSTime_get_nsecs(lua_State* L) {
- NSTime time = toNSTime(L,1);
+ NSTime nstime = toNSTime(L,1);
- lua_pushnumber (L,(lua_Number)(time->nsecs));
+ lua_pushnumber (L,(lua_Number)(nstime->nsecs));
return 1;
}
static int NSTime_set_nsecs(lua_State* L) {
- NSTime time = toNSTime(L,1);
+ NSTime nstime = toNSTime(L,1);
int nsecs = luaL_checkint(L,3);
- time->nsecs = nsecs;
+ nstime->nsecs = nsecs;
return 0;
}
@@ -230,11 +230,11 @@ static const nstime_actions_t nstime_actions[] = {
};
static int NSTime__index(lua_State* L) {
- NSTime time = checkNSTime(L,1);
+ NSTime nstime = checkNSTime(L,1);
const gchar* name = luaL_checkstring(L,2);
const nstime_actions_t* pa;
- if (! (time && name) ) return 0;
+ if (! (nstime && name) ) return 0;
for (pa = nstime_actions; pa->name; pa++) {
if ( g_str_equal(name,pa->name) ) {
@@ -252,11 +252,11 @@ static int NSTime__index(lua_State* L) {
}
static int NSTime__newindex(lua_State* L) {
- NSTime time = checkNSTime(L,1);
+ NSTime nstime = checkNSTime(L,1);
const gchar* name = luaL_checkstring(L,2);
const nstime_actions_t* pa;
- if (! (time && name) ) return 0;
+ if (! (nstime && name) ) return 0;
for (pa = nstime_actions; pa->name; pa++) {
if ( g_str_equal(name,pa->name) ) {
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c
index c6d27f6223..74f54ba50c 100644
--- a/plugins/gryphon/packet-gryphon.c
+++ b/plugins/gryphon/packet-gryphon.c
@@ -1306,7 +1306,7 @@ resp_register(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
resp_getspeeds(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- int index,
+ int indx,
size = tvb_get_guint8(tvb, offset+8),
number = tvb_get_guint8(tvb, offset+9);
@@ -1316,9 +1316,9 @@ resp_getspeeds(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree_add_item(pt, hf_gryphon_getspeeds_preset, tvb, offset+9, 1, ENC_BIG_ENDIAN);
offset += 10;
- for (index = 1; index <= number; index++) {
+ for (indx = 1; indx <= number; indx++) {
proto_tree_add_bytes_format(pt, hf_gryphon_getspeeds_data, tvb, offset, size,
- tvb_get_ptr(tvb, offset, size), "Data for preset %d", index);
+ tvb_get_ptr(tvb, offset, size), "Data for preset %d", indx);
offset += size;
}
return offset;
@@ -2100,7 +2100,7 @@ static int
cmd_init_strat (tvbuff_t *tvb, int offset, proto_tree *pt)
{
guint32 reset_limit;
- int msglen, index;
+ int msglen, indx;
float value;
msglen = tvb_reported_length_remaining(tvb, offset);
@@ -2109,14 +2109,14 @@ cmd_init_strat (tvbuff_t *tvb, int offset, proto_tree *pt)
reset_limit, "Reset Limit = %u messages", reset_limit);
offset += 4;
msglen -= 4;
- for (index = 1; msglen; index++, offset++, msglen--) {
+ for (indx = 1; msglen; indx++, offset++, msglen--) {
value = tvb_get_guint8(tvb, offset);
if (value)
proto_tree_add_float_format_value(pt, hf_gryphon_init_strat_delay, tvb, offset, 1,
- value/4, "Delay %d = %.2f seconds", index, value/4);
+ value/4, "Delay %d = %.2f seconds", indx, value/4);
else
proto_tree_add_float_format_value(pt, hf_gryphon_init_strat_delay, tvb, offset, 1,
- 0, "Delay %d = infinite", index);
+ 0, "Delay %d = infinite", indx);
}
return offset;
diff --git a/plugins/opcua/opcua.c b/plugins/opcua/opcua.c
index de80d74abb..1116834609 100644
--- a/plugins/opcua/opcua.c
+++ b/plugins/opcua/opcua.c
@@ -224,15 +224,15 @@ static void dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* display the service type in addition to the message type */
if (iServiceId != -1)
{
- int index = 0;
- while (index < g_NumServices)
+ int indx = 0;
+ while (indx < g_NumServices)
{
- if (g_requesttypes[index].value == (guint32)iServiceId)
+ if (g_requesttypes[indx].value == (guint32)iServiceId)
{
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", g_szMessageTypes[msgtype], g_requesttypes[index].strptr);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", g_szMessageTypes[msgtype], g_requesttypes[indx].strptr);
break;
}
- index++;
+ indx++;
}
}
}
diff --git a/plugins/opcua/opcua_extensionobjecttable.c b/plugins/opcua/opcua_extensionobjecttable.c
index 8df9e0abaa..40d6e48efa 100644
--- a/plugins/opcua/opcua_extensionobjecttable.c
+++ b/plugins/opcua/opcua_extensionobjecttable.c
@@ -163,7 +163,7 @@ const int g_NumTypes = sizeof(g_arExtensionObjectParserTable) / sizeof(Extension
void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int TypeId)
{
gint iOffset = *pOffset;
- int index = 0;
+ int indx = 0;
int bFound = 0;
gint32 iLen = 0;
@@ -171,15 +171,15 @@ void dispatchExtensionObjectType(proto_tree *tree, tvbuff_t *tvb, gint *pOffset,
iLen = tvb_get_letohl(tvb, iOffset);
iOffset += 4;
- while (index < g_NumTypes)
+ while (indx < g_NumTypes)
{
- if (g_arExtensionObjectParserTable[index].iRequestId == TypeId)
+ if (g_arExtensionObjectParserTable[indx].iRequestId == TypeId)
{
bFound = 1;
- (*g_arExtensionObjectParserTable[index].pParser)(tree, tvb, &iOffset, g_arExtensionObjectParserTable[index].typeName);
+ (*g_arExtensionObjectParserTable[indx].pParser)(tree, tvb, &iOffset, g_arExtensionObjectParserTable[indx].typeName);
break;
}
- index++;
+ indx++;
}
/* display contained object as ByteString if unknown type */
diff --git a/plugins/opcua/opcua_servicetable.c b/plugins/opcua/opcua_servicetable.c
index 1b62c99045..1d39ca5fc1 100644
--- a/plugins/opcua/opcua_servicetable.c
+++ b/plugins/opcua/opcua_servicetable.c
@@ -3,15 +3,15 @@
**
** Copyright (C) 2006-2009 ascolab GmbH. All Rights Reserved.
** Web: http://www.ascolab.com
-**
+**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License
** as published by the Free Software Foundation; either version 2
** of the License, or (at your option) any later version.
-**
+**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
+**
** Project: OpcUa Wireshark Plugin
**
** Description: Service table and service dispatcher.
@@ -197,16 +197,16 @@ const value_string g_requesttypes[] = {
/** Dispatch all services to a special parser function. */
void dispatchService(proto_tree *tree, tvbuff_t *tvb, gint *pOffset, int ServiceId)
{
- int index = 0;
+ int indx = 0;
- while (index < g_NumServices)
+ while (indx < g_NumServices)
{
- if (g_arParserTable[index].iRequestId == ServiceId)
+ if (g_arParserTable[indx].iRequestId == ServiceId)
{
- (*g_arParserTable[index].pParser)(tree, tvb, pOffset);
+ (*g_arParserTable[indx].pParser)(tree, tvb, pOffset);
break;
}
- index++;
+ indx++;
}
}
diff --git a/plugins/wimax/msg_aas_beam.c b/plugins/wimax/msg_aas_beam.c
index 1151d79992..7164d4e0e8 100644
--- a/plugins/wimax/msg_aas_beam.c
+++ b/plugins/wimax/msg_aas_beam.c
@@ -169,7 +169,7 @@ static void dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info
{
guint offset = 0;
guint tvb_len, payload_type, report_type;
- guint number_of_frequencies, index;
+ guint number_of_frequencies, indx;
proto_item *aas_beam_item = NULL;
proto_tree *aas_beam_tree = NULL;
@@ -217,7 +217,7 @@ static void dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info
/* calculate the total number of frequencies */
number_of_frequencies = (tvb_len - offset) / 2 - 1;
/* display the frequency */
- for(index = 0; index < number_of_frequencies; index++)
+ for(indx = 0; indx < number_of_frequencies; indx++)
{ /* display the Frequency Value (real part) */
proto_tree_add_item(aas_beam_tree, hf_aas_beam_freq_value_re, tvb, offset, 1, ENC_BIG_ENDIAN);
/* move to next field */
@@ -247,21 +247,21 @@ void proto_register_mac_mgmt_msg_aas_beam(void)
{
&hf_aas_beam_message_type,
{
- "MAC Management Message Type", "wmx.macmgtmsgtype.aas_beam",
+ "MAC Management Message Type", "wmx.macmgtmsgtype.aas_beam",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_aas_beam_select_index,
{
- "AAS Beam Index", "wmx.aas_beam.aas_beam_index",
+ "AAS Beam Index", "wmx.aas_beam.aas_beam_index",
FT_UINT8, BASE_DEC, NULL, AAS_BEAM_SELECT_AAS_BEAM_INDEX_MASK, NULL, HFILL
}
},
{
&hf_aas_beam_beam_bit_mask,
{
- "Beam Bit Mask", "wmx.aas_beam.beam_bit_mask",
+ "Beam Bit Mask", "wmx.aas_beam.beam_bit_mask",
FT_UINT8, BASE_HEX, NULL, AAS_BEAM_BEAM_BIT_MASK_MASK, NULL, HFILL
}
},
@@ -269,63 +269,63 @@ void proto_register_mac_mgmt_msg_aas_beam(void)
{
&hf_aas_beam_cinr_value,
{
- "CINR Mean Value", "wmx.aas_beam.cinr_mean_value",
+ "CINR Mean Value", "wmx.aas_beam.cinr_mean_value",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_aas_beam_feedback_request_number,
{
- "Feedback Request Number", "wmx.aas_beam.feedback_request_number",
+ "Feedback Request Number", "wmx.aas_beam.feedback_request_number",
FT_UINT8, BASE_DEC, NULL, AAS_BEAM_FEEDBACK_REQUEST_NUMBER_MASK, NULL, HFILL
}
},
{
&hf_aas_beam_frame_number,
{
- "Frame Number", "wmx.aas_beam.frame_number",
+ "Frame Number", "wmx.aas_beam.frame_number",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_aas_beam_freq_value_im,
{
- "Frequency Value (imaginary part)", "wmx.aas_beam.freq_value_im",
+ "Frequency Value (imaginary part)", "wmx.aas_beam.freq_value_im",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_aas_beam_freq_value_re,
{
- "Frequency Value (real part)", "wmx.aas_beam.freq_value_re",
+ "Frequency Value (real part)", "wmx.aas_beam.freq_value_re",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
{
&hf_aas_beam_measurement_report_type,
{
- "Measurement Report Type", "wmx.aas_beam.measurement_report_type",
+ "Measurement Report Type", "wmx.aas_beam.measurement_report_type",
FT_UINT8, BASE_DEC, VALS(vals_report_types), AAS_BEAM_MEASUREMENT_REPORT_TYPE_MASK, NULL, HFILL
}
},
{
&hf_aas_beam_select_reserved,
{
- "Reserved", "wmx.aas_beam.reserved",
+ "Reserved", "wmx.aas_beam.reserved",
FT_UINT8, BASE_HEX, NULL, AAS_BEAM_SELECT_RESERVED_MASK, NULL, HFILL
}
},
{
&hf_aas_beam_resolution_parameter,
{
- "Resolution Parameter", "wmx.aas_beam.resolution_parameter",
+ "Resolution Parameter", "wmx.aas_beam.resolution_parameter",
FT_UINT8, BASE_DEC, VALS(vals_resolution_parameter), AAS_BEAM_RESOLUTION_PARAMETER_MASK, NULL, HFILL
}
},
{
&hf_aas_beam_rssi_value,
{
- "RSSI Mean Value", "wmx.aas_beam.rssi_mean_value",
+ "RSSI Mean Value", "wmx.aas_beam.rssi_mean_value",
FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL
}
},
@@ -333,7 +333,7 @@ void proto_register_mac_mgmt_msg_aas_beam(void)
{
&hf_aas_beam_unknown_type,
{
- "Unknown TLV type", "wmx.aas_beam.unknown_type",
+ "Unknown TLV type", "wmx.aas_beam.unknown_type",
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL
}
}
diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l
index 7afbdfe5c9..71259ef51c 100644
--- a/plugins/wimaxasncp/wimaxasncp_dict.l
+++ b/plugins/wimaxasncp/wimaxasncp_dict.l
@@ -548,14 +548,14 @@ static void append_to_buffer(gchar *txt, int len) {
}
static size_t file_input(gchar *buf, size_t max) {
- size_t read;
+ size_t read_cnt;
- read = fread(buf,1,max,yyin);
+ read_cnt = fread(buf,1,max,yyin);
- if ( read == max ) {
+ if ( read_cnt == max ) {
return max;
- } else if (read > 0) {
- return read;
+ } else if (read_cnt > 0) {
+ return read_cnt;
} else {
return YY_NULL;
}
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 */