Fix numerous instances of a variable/parameter name "shadowing" a library function...
authorBill Meier <wmeier@newsguy.com>
Wed, 5 Dec 2012 15:56:36 +0000 (15:56 -0000)
committerBill Meier <wmeier@newsguy.com>
Wed, 5 Dec 2012 15:56:36 +0000 (15:56 -0000)
(At least some (gcc ?) compilers give a "shadow" warning for these).

svn path=/trunk/; revision=46402

86 files changed:
capture_sync.c
epan/diam_dict.l
epan/dissectors/packet-dmp.c
epan/dissectors/packet-epl.c
epan/dissectors/packet-gmhdr.c
epan/dissectors/packet-ieee80211-prism.c
epan/dissectors/packet-mysql.c
epan/dissectors/packet-radius.c
epan/dissectors/packet-reload-framing.c
epan/dissectors/packet-reload.c
epan/dissectors/packet-rlc.c
epan/dissectors/packet-sbus.c
epan/dissectors/packet-sna.c
epan/dissectors/packet-tcp.c
epan/dissectors/packet-xmpp.c
epan/follow.c
epan/radius_dict.l
epan/wslua/wslua_pinfo.c
plugins/gryphon/packet-gryphon.c
plugins/opcua/opcua.c
plugins/opcua/opcua_extensionobjecttable.c
plugins/opcua/opcua_servicetable.c
plugins/wimax/msg_aas_beam.c
plugins/wimaxasncp/wimaxasncp_dict.l
ui/export_object.c
ui/gtk/afp_stat.c
ui/gtk/ansi_map_stat.c
ui/gtk/bootp_stat.c
ui/gtk/camel_counter.c
ui/gtk/camel_srt.c
ui/gtk/capture_dlg.c
ui/gtk/cfilter_combo_utils.c
ui/gtk/compare_stat.c
ui/gtk/conversations_eth.c
ui/gtk/conversations_fc.c
ui/gtk/conversations_fddi.c
ui/gtk/conversations_ip.c
ui/gtk/conversations_ipv6.c
ui/gtk/conversations_ipx.c
ui/gtk/conversations_jxta.c
ui/gtk/conversations_ncp.c
ui/gtk/conversations_rsvp.c
ui/gtk/conversations_sctp.c
ui/gtk/conversations_tcpip.c
ui/gtk/conversations_tr.c
ui/gtk/conversations_udpip.c
ui/gtk/conversations_usb.c
ui/gtk/conversations_wlan.c
ui/gtk/dcerpc_stat.c
ui/gtk/diameter_stat.c
ui/gtk/dlg_utils.c
ui/gtk/expert_comp_dlg.c
ui/gtk/fc_stat.c
ui/gtk/filter_expression_save_dlg.c
ui/gtk/gsm_a_stat.c
ui/gtk/gsm_map_stat.c
ui/gtk/gtp_stat.c
ui/gtk/h225_counter.c
ui/gtk/h225_ras_srt.c
ui/gtk/hostlist_eth.c
ui/gtk/hostlist_fc.c
ui/gtk/hostlist_fddi.c
ui/gtk/hostlist_ip.c
ui/gtk/hostlist_ipv6.c
ui/gtk/hostlist_ipx.c
ui/gtk/hostlist_jxta.c
ui/gtk/hostlist_ncp.c
ui/gtk/hostlist_rsvp.c
ui/gtk/hostlist_sctp.c
ui/gtk/hostlist_tcpip.c
ui/gtk/hostlist_tr.c
ui/gtk/hostlist_udpip.c
ui/gtk/hostlist_usb.c
ui/gtk/hostlist_wlan.c
ui/gtk/io_stat.c
ui/gtk/ldap_stat.c
ui/gtk/main_80211_toolbar.c
ui/gtk/main_filter_toolbar.c
ui/gtk/main_welcome.c
ui/gtk/prefs_filter_expressions.c
ui/gtk/rtp_player.c
ui/gtk/sctp_graph_dlg.c
ui/gtk/service_response_time_table.c
ui/gtk/tcp_graph.c
ui/gtk/time_shift_dlg.c
ui/text_import.c

index a1d0aa29bd82181e308b498a542e7adbac3fa08b..eed62c47643c5c011dcc8042cc5ced1177a18e61 100644 (file)
@@ -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;
         }
index 7874112428a9aaaf5e257a3c8f88facce4fa21ec..b9006fb8908c487b8567f78b5ade84f3effc645b 100644 (file)
@@ -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;
        }
index 3495485d9a4ccb90ad64e0e936b033414f386cd9..959e3a8430061670e295ea24ced3841fbab2fe80 100644 (file)
@@ -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 */
index 994d34acfd5e3fded998f6cb87e0148ff1745d70..98c563d6aba664291ff80113371ad54105c44d0d 100644 (file)
@@ -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);
         }
 
     }
index 51b3dccfbd2a741a545d88c81322ecf259eaf334..82083cbeba32d315a7e56e51b77fd683823fcfed 100644 (file)
@@ -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;
index f7cbf137f37a9fce43fe7c989d59fc978a4175fe..9cb1a5fccc5262f391b89416c79a45f40338b456 100644 (file)
@@ -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)
index 49459faae6568ba65f8c9d8d13c3148257b37f2c..8f941fa8f56fb6ab3636d6b156267461f5b08f5a 100644 (file)
@@ -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;
index b957c120a75c2090b126e46d6119d01ea187f5cf..cc832a2e06a2ad41e28ac47468c913773eabdc17 100644 (file)
@@ -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);
        }
 }
 
index 2ca74a9254302d286437eafcd9b9221b9a36fe9a..2e659dceebe44053d8e7c3e0db81b5ff7b58e26d 100644 (file)
@@ -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         ind              = 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, "]");
index 7a662d108cdb3af7294839c25f6a3a21966c0be3..4ee8469f4c9cb9786fa2c9b60ae8ebb8b6841a6c 100644 (file)
@@ -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;
index 587d160dc49b42a075042b24da494dc166b46ef6..fab75c4da43f6b8f11f50d573fb8d2689218b0c2 100644 (file)
@@ -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;
index 9c472fe1b3cbb62d9cb6d2e2ec1d3d6dad1f0e73..4904574ae6b5160c01f28bf16dac3eef1868b1b1 100644 (file)
@@ -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;
 }
index 76c785473e83c0452111ca150941dc47ea0ccb6f..111d6dfb8dd780d511459c2a99cb8ac312c85b6d 100644 (file)
@@ -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);
                }
        }
index ba4ec1619dd280f3880dd0e6c6c2178fd420d7dd..05ab2f9ea8684570861674f45fd0df1b73c28bcc 100644 (file)
@@ -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);
index bd74a05aa5b2732e44bda1ea0c3d05b2a1b9c8e8..8e22faa6e30c626c9d47b68425f664dfcc3de220 100644 (file)
@@ -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;
index c27ba5afc9b69c80509791916f12b64eaa83176d..859d5f42052b5174ccbf709d6c7386d99531500e 100644 (file)
@@ -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;
 
index 9129471b45d44ca93c430e75edfb9d1a0faa06b6..11c6c8032420652de678bb508984efc7ef5fc194 100644 (file)
@@ -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;
index 5fecb5ea85961c7177dc7661b821108e83008cc1..7698ee722573402630eb698fa7e191ab8604df95 100644 (file)
@@ -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) ) {
index c6d27f6223a3cfce8bb1d0ac694469940c8f3fac..74f54ba50c71937c99a4ec16752c6e65e5896ac9 100644 (file)
@@ -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;
index de80d74abb186da9142ce91e37f51fa131d20e4e..11168346098f115d2b84bb286d318472dc582ac5 100644 (file)
@@ -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++;
             }
         }
     }
index 8df9e0abaade81926a3fbe1c9dcdfbcfb6108df5..40d6e48efac5b5b2251ee3b599c724bb30a675d5 100644 (file)
@@ -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 */
index 1b62c99045ab94331618e60170f51789e9a57c08..1d39ca5fc1e049dbb67959fb31e49c8aad77f3ef 100644 (file)
@@ -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++;
     }
 }
 
index 1151d7999229b5b1de5a38dd972c5c26b2999027..7164d4e0e86a862aa6ff762453f33f95c8269ef7 100644 (file)
@@ -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
                        }
                }
index 7afbdfe5c9de3efcbe0cafa8b8af836546fe22c5..71259ef51ca920265038384f6f4bb771f3eae1d0 100644 (file)
@@ -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;
        }
index a85a0a2b46b2a48717adf12ebccb6e9b157dd67f..5a07651075b7addf4b599604c611a52243d4bb18 100644 (file)
@@ -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;
 }
 
index 5842af83c68d9aa64cfcab3532cbd616191296f1..e38063ee4b4ba4d5f1ce70421cf6e35f6fe336ef 100644 (file)
@@ -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;
        }
index b5fc741a1fb0267147f8d365c63378109f9d8983..c1f9d0cdb89391090efbb827cee3d30ac976564a 100644 (file)
@@ -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);
index 0cabf6e72499ec88fd4a12a3f1d3ecbb4a7fb43d..b7f5d68a81da592de00a12398e902307ba818879 100644 (file)
@@ -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;
        }
index 2e70c4def948b3cc42a31df715d7fcdc573e8402..185b9b7aad9df49d88749d28bec75ff5e3ccae3d 100644 (file)
@@ -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;
   }
index ec4f2cb8ffbeea2ad588c989ef4ed3f9efbd2335..639dbb08470b64397cb4862433ae6a3df3370e18 100644 (file)
@@ -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;
   }
index 7a6459d06b9eaaa97bb8dcf4a9a802049ae3c689..4a1383bb1340c2e6c8895fc3995fb2e0c08c7cba 100644 (file)
@@ -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);
index 39cdda78edde2730377cb28ca23a7f5b688c25ad..1b1b1a09c9c0a7e0d98d8aa45dd58767bce1e2da 100644 (file)
@@ -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;
      }
    }
index 4a80b5ce2b0febfd478743b2be1150a0727f042a..62d36c34e70d3b69cfd7f3c8bf5e223980f818cc 100644 (file)
@@ -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;
                }
index 6181b3bf35fe62504ab0465cfae0a7e67b07508c..41b79d4747c1df7887290fe83fb3ee73076eace1 100644 (file)
@@ -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;
        }
index b455538c5d9ce398d37c3f5dc61b948319a0a593..34dbb7c312a6beb5a2c1e6f44410b916c5b472f9 100644 (file)
@@ -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;
        }
index 85b9de3926f189c342bec67e15f9eb02b964a6fa..e18aaf6f4f64f5ad1ee9e79a330d766c96eb4fde 100644 (file)
@@ -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;
        }
index 19ac825cb8d843d81fc1f87fb7b553b6bbf6cc7e..3cf503b0f88645899def76593de95fd39eadd0e8 100644 (file)
@@ -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;
        }
index 02b44a5d3e3144a3eebefc4af49cec2c8c720e51..3bc2ee8307222bd0d4e497280b523d1945fbb660 100644 (file)
@@ -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;
index 87300ffc2b7f02718943ae951b726f7e6c948c68..f0751feffc86f97763ae6765c56bbbfa47e37576 100644 (file)
@@ -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;
        }
index a0c7759fbba31d08443bc65890fe2c6090713d6f..de82cc8b7982a40a0eec63a494b9f0631963d384 100644 (file)
@@ -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;
        }
index 5554652a35aff0aedd31b1817f6a2a9e8c4d7bf3..0bd48dc9c374880aa434c8eade19190ebadf27a9 100644 (file)
@@ -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;
        }
index b8684d964d63fc0a20a249b6c305c2067572e228..848d98052a280165bb8fc20328eb46a6c649997f 100644 (file)
@@ -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;
        }
index 067ff38f9302aa7087b4015f51fd68d1d23fa2c1..3c5a3b067f6ea7d3786fca3d0664214d1368c4e5 100644 (file)
@@ -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;
        }
index a8c25ce0efd0ec29a7a1f111d33de4f17c8589d3..6504d905de20b4fa55e977999446135cb0a2a356 100644 (file)
@@ -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;
        }
index 9559424338415a280d2ff9ef48070e8c614fd5e0..28bc003ac21a2fe50b1143ccf6ddedc23e373f4a 100644 (file)
@@ -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;
        }
index 037f967baaa1b6b1f70976ad3e42c1876886f281..b9f03d21e8b7d6b1bd6cd7db0763efb5f2476096 100644 (file)
@@ -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;
        }
index 4d21ecee9f3b5eceffe89d7903a076b28fa67420..8c320ba52a5e7aa6c6340a81690de706edfbebed 100644 (file)
@@ -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;
        }
index 84856dbc922dc2459f2e205b63a14822cc03491f..f89a952bcff1059d27b0422db401a76c3134ece2 100644 (file)
@@ -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;
        }
index 2d6f8b0714ec76c5ca33e524591f08c065900897..3bce9c98c66d5f39fcbdfd73e1a7c7d6e37286f1 100644 (file)
@@ -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;
                }
index 11cbbfc78f01bcd6cbc9fbce796723c7806d0da6..3ba9df845fbf43e74c579e52bd8982fa27150fe9 100644 (file)
@@ -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 ?*/
        }
index c1c32f2bd307e9f693cf54a2f17e8b3de8d39703..4855f436df99c336fdc47aae68ea19d060015fbd 100644 (file)
@@ -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;
index 64edc0f6062fda1602228ffc5b2bbca89b1dd706..712b35616d6f02404e68126c05d017aa80d461f2 100644 (file)
@@ -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;
index 2bc97fac537fc05daa499a463895077725c1d5a9..fa4f8bad5eb5cbfdefa261ee372a01703927916a 100644 (file)
@@ -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;
        }
index 9b10e5f8fc2c4bdb33445a0c5770fc5bd5dad7ff..1c9b598de129db3241173344c6e03ce0dfd64ace 100644 (file)
@@ -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)
index 3e85b5e20d6bb371530d15b5c1664aaed1e2e3ea..1bc5c8d5cc9deade38df8a4a98f1a85a8b8e70e0 100644 (file)
@@ -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);
index 1ca0c0153f5904955ccd204ca1599a352a7b90b3..db0ee33df78324f875644639b6f64dbf810f7713 100644 (file)
@@ -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);
index 48382a8c3af053b4ffe72206678530ebf5863f1a..5e04472a3b2e0ed9f0c8f0297cf25dc78bb29893 100644 (file)
@@ -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 ?*/
        }
index 9269ff24ed66b0d16011f9f9af429d1a227b3f9a..b9d72fa3113f449c11931b1c5f6286ba820583c0 100644 (file)
@@ -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;
        }
index 36938b0d0155a2e3c32e0a18771ff1116f8e1fba..17607e78510d55ae903558f3240b819247801cd6 100644 (file)
@@ -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;
        }
index 5311883ca0fdbac9cc9a1a958cfbedfa3cf45dca..a7564f5c2f0ba172a84703182138366a62f4a4da 100644 (file)
@@ -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;
        }
index 2b0587c7987ae0d973b39f7af55110170c35f005..cc054792d5ff54e81d08d12ff80257c24ca74f68 100644 (file)
@@ -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;
        }
index a898ed3c9a8d02507ed29bd7be7f41f6d6505849..8b1c3fb553fe3ffc312f1c999f89e466c5a60c99 100644 (file)
@@ -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;
        }
index 09e099ab5b94f7c5cef8ebc298c1df235de6f5fd..0a4defc73154b2f009fc3a3974fa28cb006bdad8 100644 (file)
@@ -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;
        }
index ac59f46096759abbfe8e05d38172b17ef411dd31..faf9db593b23d237743d6651d625a8678de34ca8 100644 (file)
@@ -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;
     }
index 81a70d308a16100957ceeebd209ad824ee86d692..701d4c6c01214f32d41a18265bd239eb1490bf33 100644 (file)
@@ -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;
        }
index 5a32efc77c042c70db8839a70590ee0c937bc120..c608d5191f419c7a6cf2f4d4be36217aab9554ba 100644 (file)
@@ -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;
        }
index 785f69c86a04ae0d0a888f3de82f37dee2f52264..4693feeacb467ca04ab14f4039f3920610e15086 100644 (file)
@@ -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;
         }
index c524b896b0c6419937f6ae51f3fc94ece1c3e46c..c0fa2139dd1421ac44d32e11be40d52fd3fbd233 100644 (file)
@@ -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;
        }
index 0fd1f94e0315f0015ee78699894b62cd15adcd59..6193253bc072ff4ab48787be4f271aa9477459eb 100644 (file)
@@ -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;
         }
index e19ae5e7c9a9a2f9b0ee1198492aeb020db7f159..e78ef5e597ad65f87c9ff6b4b352fa0aacaf0e45 100644 (file)
@@ -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;
        }
index 524194663d5a2bba55419da30a64156f40c21731..6421899ffdaafb8a11ff716f4a8efbb1b5c7ac8f 100644 (file)
@@ -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;
        }
index f93b9086dcfaf50d422e05280fef3a77bc959b4b..033d8f8d0f1964c292a7bc55e24a562b23828246 100644 (file)
@@ -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;
        }
index 2c7c6391a6811f921525a7deee85f3ce4a632204..427028f7d60cb53bff9b4470591e1c5767bffba1 100644 (file)
@@ -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;
         }
index 2d5a61c1c46b3fbe8b86815275ac81e1d8ff700c..a1e9ade7e52a8aaf705a5000219c7e07a44892f2 100644 (file)
@@ -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;
         }
index c3bc6b46909b64b4a35a7182dad92dfa89cd4f6c..9c4e092e84d1d75de9c5dab1e4b3a6ea6fd1e1cc 100644 (file)
@@ -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;
index 29eb96d144fb1688a9211f1e26e07fb944f3533e..828cc30ff9e99053a86177d8b4ceb64a6a429903 100644 (file)
@@ -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;
        }
index 557ba072d706ec7ab7fc2899994a9d4700a2183f..67fe847bb5349d6971f614ccd642e87ff3743847 100644 (file)
@@ -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;
     }
 }
index 6b92301785559fce98654cfce5f9de5659175f66..2388261c70ba8d242989c2c02ccb3db1d7ecf1b8 100644 (file)
@@ -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)
index 4b040626f28139ef8ba3e625b98fa84a7d77cc3f..6c612ae3901da52bbc3ddf7b5058f947046d0380 100644 (file)
@@ -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));
index bfbbc474f80bbc49a8883870d5fd6e2c239461e9..4e618c68b1305288917a6dfd51824fa172ed034d 100644 (file)
@@ -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);
     }
 
index 2f4e757bb4230b711036b2fd46f4868f7a830210..e2ef3447f75a3561809dd7f8afed5fa14d0f3300 100644 (file)
@@ -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);
index d51f9044440c2289610878b90f3449d8710006ff..566b3207918b137f6d0d9a29bd53556a72dffa77 100644 (file)
@@ -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 &&
index fbd5d56f0250a58da8eec4fa862df71fcce71c87..f957963a36603deeb9c3879ec481fad7b42aa747 100644 (file)
@@ -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
index 1c50445ffb4d41642cb6ea107b3ca2e3702a2469..d28735462725f6a01933631f363f7c8565bfbeb0 100644 (file)
@@ -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?) */
index 57a31c8155f8601fba2aecf0d75769bea85f15dc..dc80cb58ac6a4b450e3c115ac3acd7c9a4dbaae5 100644 (file)
@@ -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);
 
index 45d48bae8c51ab18fb9e608567820d54a170ca74..690e6e8f00e0b8068380b0ba996ad57a8d4a9d4e 100644 (file)
@@ -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 */