Removed some unneeded assignments.
Found by clang. svn path=/trunk/; revision=36698
This commit is contained in:
parent
9739656c71
commit
27344a90fe
|
@ -208,7 +208,7 @@ dissect_discoverresponse(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
|
|||
"Controller list");
|
||||
btamp_controller_list_tree=proto_item_add_subtree(ti_controller_list, ett_btamp_controller_list);
|
||||
|
||||
while ((length = tvb_length_remaining(tvb, offset)) >= 3) {
|
||||
while (tvb_length_remaining(tvb, offset) >= 3) {
|
||||
offset = dissect_controller_entry(tvb, offset, pinfo, btamp_controller_list_tree, idx);
|
||||
++idx;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ dissect_changenotify(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
|
|||
"Controller list");
|
||||
btamp_controller_list_tree=proto_item_add_subtree(ti_controller_list, ett_btamp_controller_list);
|
||||
|
||||
while ((length = tvb_length_remaining(tvb, offset)) >= 3) {
|
||||
while (tvb_length_remaining(tvb, offset) >= 3) {
|
||||
offset = dissect_controller_entry(tvb, offset, pinfo, btamp_controller_list_tree, idx);
|
||||
++idx;
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, char **data)
|
|||
* Get the length of the string.
|
||||
*/
|
||||
len = 0;
|
||||
while ((character = tvb_get_ntohs(tvb, offset + len)) != '\0')
|
||||
while (tvb_get_ntohs(tvb, offset + len) != '\0')
|
||||
len += 2;
|
||||
|
||||
len += 2; /* count the '\0' too */
|
||||
|
|
|
@ -77,7 +77,6 @@ dissect_cwids(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree *ti, *cwids_tree;
|
||||
volatile int offset = 0;
|
||||
guint16 capturelen;
|
||||
guint remain;
|
||||
void *pd_save;
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "CWIDS");
|
||||
|
@ -86,7 +85,7 @@ dissect_cwids(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
cwids_tree = NULL;
|
||||
|
||||
while((remain = tvb_length_remaining(tvb, offset)) > 0) {
|
||||
while(tvb_length_remaining(tvb, offset) > 0) {
|
||||
ti = proto_tree_add_item(tree, proto_cwids, tvb, offset, 28, FALSE);
|
||||
cwids_tree = proto_item_add_subtree(ti, ett_cwids);
|
||||
|
||||
|
|
|
@ -420,7 +420,7 @@ static gint display_unicode_string(proto_tree *tree, gint hf_index, tvbuff_t *tv
|
|||
* if we don't find the '\0'? I think it's a feature.
|
||||
*/
|
||||
len = 0;
|
||||
while ((character = tvb_get_letohs(tvb, offset + len)) != '\0')
|
||||
while (tvb_get_letohs(tvb, offset + len) != '\0')
|
||||
len += 2;
|
||||
len += 2; /* count the '\0' too */
|
||||
|
||||
|
|
|
@ -465,7 +465,6 @@ decrypt_dtls_record(tvbuff_t *tvb, packet_info *pinfo, guint32 offset,
|
|||
gboolean save_plaintext)
|
||||
{
|
||||
gint ret;
|
||||
gint direction;
|
||||
SslDecoder* decoder;
|
||||
ret = 0;
|
||||
|
||||
|
@ -479,7 +478,7 @@ decrypt_dtls_record(tvbuff_t *tvb, packet_info *pinfo, guint32 offset,
|
|||
}
|
||||
|
||||
/* retrive decoder for this packet direction */
|
||||
if ((direction = ssl_packet_from_server(ssl, dtls_associations, pinfo)) != 0) {
|
||||
if (ssl_packet_from_server(ssl, dtls_associations, pinfo) != 0) {
|
||||
ssl_debug_printf("decrypt_dtls_record: using server decoder\n");
|
||||
decoder = ssl->server;
|
||||
}
|
||||
|
|
|
@ -2621,9 +2621,8 @@ dissect_isup_circuit_state_ind_parameter(tvbuff_t *parameter_tvb, proto_tree *pa
|
|||
guint8 circuit_state;
|
||||
gint offset=0;
|
||||
gint i=0;
|
||||
gint length;
|
||||
|
||||
while((length = tvb_reported_length_remaining(parameter_tvb, offset)) > 0){
|
||||
while(tvb_reported_length_remaining(parameter_tvb, offset) > 0){
|
||||
circuit_state_item = proto_tree_add_text(parameter_tree, parameter_tvb,
|
||||
offset, -1,
|
||||
"Circuit# CIC+%u state", i);
|
||||
|
|
|
@ -921,7 +921,6 @@ content_data_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
int content_length, guint8 opcode)
|
||||
{
|
||||
gint datalen;
|
||||
int len;
|
||||
gboolean short_pkt = FALSE;
|
||||
|
||||
/*
|
||||
|
@ -929,7 +928,7 @@ content_data_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
* the buffer. It is not necessary that we have all the
|
||||
* content_length bytes available to read.
|
||||
*/
|
||||
if ((len = tvb_reported_length_remaining (tvb, offset) != 0)) {
|
||||
if (tvb_reported_length_remaining (tvb, offset) != 0) {
|
||||
/* bytes actually remaining in this tvbuff. */
|
||||
datalen = tvb_length_remaining (tvb, offset);
|
||||
if (content_length >= 0) {
|
||||
|
@ -1000,14 +999,14 @@ static int
|
|||
incr_dissector (tvbuff_t *tvb, proto_tree *tree, int offset)
|
||||
{
|
||||
gint next_offset;
|
||||
int linelen, len;
|
||||
int linelen;
|
||||
const guchar *line, *lineend;
|
||||
|
||||
const guchar *next_token;
|
||||
int tokenlen;
|
||||
|
||||
/* expecting to read 'bytes' number of bytes from the buffer. */
|
||||
if ((len = tvb_reported_length_remaining (tvb, offset)) != 0) {
|
||||
if (tvb_reported_length_remaining (tvb, offset) != 0) {
|
||||
/* Find the end of the line. */
|
||||
linelen = tvb_find_line_end (tvb, offset,
|
||||
tvb_ensure_length_remaining (tvb, offset), &next_offset,
|
||||
|
@ -1057,11 +1056,10 @@ stat_dissector (tvbuff_t *tvb, proto_tree *tree, int offset)
|
|||
gint next_offset;
|
||||
const guchar *next_token;
|
||||
const guchar *line, *lineend;
|
||||
int reported_datalen = -1;
|
||||
guint32 slabclass;
|
||||
guchar response_chars[21];
|
||||
|
||||
while ((reported_datalen = tvb_reported_length_remaining (tvb, offset)) != 0) {
|
||||
while (tvb_reported_length_remaining (tvb, offset) != 0) {
|
||||
/* Find the end of the line. */
|
||||
linelen = tvb_find_line_end (tvb, offset,
|
||||
tvb_ensure_length_remaining (tvb, offset), &next_offset,
|
||||
|
@ -1167,7 +1165,7 @@ static int
|
|||
get_response_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
|
||||
{
|
||||
gint next_offset;
|
||||
int linelen, len;
|
||||
int linelen;
|
||||
const guchar *line, *lineend;
|
||||
const guchar *next_token;
|
||||
int tokenlen;
|
||||
|
@ -1178,7 +1176,7 @@ get_response_dissector (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
gchar response_chars[21]; /* cover uint64 (20 + 1) bytes*/
|
||||
|
||||
/* expecting to read 'bytes' number of bytes from the buffer. */
|
||||
while ((len = tvb_reported_length_remaining (tvb, offset)) != 0) {
|
||||
while (tvb_reported_length_remaining (tvb, offset) != 0) {
|
||||
/* Find the end of the line. */
|
||||
linelen = tvb_find_line_end (tvb, offset,
|
||||
tvb_ensure_length_remaining (tvb, offset), &next_offset,
|
||||
|
|
|
@ -1338,7 +1338,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf)
|
|||
|
||||
/* Add a recognised parameter type if we have one */
|
||||
if (*hf != NULL && len > (tvb_current_offset - offset) &&
|
||||
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':')
|
||||
tvb_get_guint8(tvb,tvb_current_offset) == ':')
|
||||
{
|
||||
tvb_current_offset++;
|
||||
tvb_current_offset = tvb_skip_wsp(tvb,tvb_current_offset, (len - tvb_current_offset + offset));
|
||||
|
|
|
@ -4923,7 +4923,7 @@ dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree*
|
|||
acc_req = civ->private_data;
|
||||
/* Should never happen because ONC-RPC requires the call in order to dissect the reply. */
|
||||
if (acc_req==NULL) {
|
||||
return offset+=4;
|
||||
return offset+4;
|
||||
}
|
||||
if(nfsv4) {
|
||||
acc_supp = tvb_get_ntohl(tvb, offset+0);
|
||||
|
@ -4967,7 +4967,7 @@ dissect_access_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree*
|
|||
offset, 4, (mask_denied > 0 ? TRUE : FALSE ));
|
||||
PROTO_ITEM_SET_GENERATED(ditem);
|
||||
|
||||
return offset+=4;
|
||||
return offset+4;
|
||||
}
|
||||
|
||||
/* RFC 1813, Page 40..43 */
|
||||
|
|
|
@ -1646,15 +1646,12 @@ dissect_rpc_continuation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
static void
|
||||
make_fake_rpc_prog_if_needed (rpc_prog_info_key *prpc_prog_key, guint prog_ver)
|
||||
{
|
||||
|
||||
rpc_prog_info_value *rpc_prog = NULL;
|
||||
|
||||
/* sanity check: no one uses versions > 10 */
|
||||
if(prog_ver>10){
|
||||
return;
|
||||
}
|
||||
|
||||
if( (rpc_prog = g_hash_table_lookup(rpc_progs, prpc_prog_key)) == NULL) {
|
||||
if(g_hash_table_lookup(rpc_progs, prpc_prog_key) == NULL) {
|
||||
/* ok this is not a known rpc program so we
|
||||
* will have to fake it.
|
||||
*/
|
||||
|
|
|
@ -3645,7 +3645,6 @@ dissect_scsi_pagecode (tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
scsi_task_data_t *cdata)
|
||||
{
|
||||
guint8 pcode;
|
||||
const gchar *valstr;
|
||||
int hf_pagecode;
|
||||
|
||||
/* unless we have cdata there is not much point in continuing */
|
||||
|
@ -3653,8 +3652,8 @@ dissect_scsi_pagecode (tvbuff_t *tvb, packet_info *pinfo _U_,
|
|||
return;
|
||||
|
||||
pcode = tvb_get_guint8 (tvb, offset);
|
||||
if ((valstr = match_strval (pcode & SCSI_MS_PCODE_BITS,
|
||||
scsi_spc_modepage_val)) == NULL) {
|
||||
if (match_strval (pcode & SCSI_MS_PCODE_BITS,
|
||||
scsi_spc_modepage_val) == NULL) {
|
||||
/*
|
||||
* This isn't a generic mode page that applies to all SCSI
|
||||
* device types; try to interpret it based on what we deduced,
|
||||
|
|
|
@ -94,7 +94,7 @@ int display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_i
|
|||
* if we don't find the '\0'? I think it's a feature.
|
||||
*/
|
||||
len = 0;
|
||||
while ((character = tvb_get_letohs(tvb, offset + len)) != '\0')
|
||||
while (tvb_get_letohs(tvb, offset + len) != '\0')
|
||||
len += 2;
|
||||
len += 2; /* count the '\0' too */
|
||||
|
||||
|
|
|
@ -363,7 +363,7 @@ dissect_ssh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
return;
|
||||
}
|
||||
|
||||
while((remain_length = tvb_reported_length_remaining(tvb,offset))> 0 ) {
|
||||
while(tvb_reported_length_remaining(tvb,offset)> 0 ) {
|
||||
need_desegmentation = FALSE;
|
||||
last_offset = offset;
|
||||
this_number = this_data->counter+number;
|
||||
|
|
|
@ -1631,12 +1631,12 @@ add_5xO(proto_tree *tree, tvbuff_t *tvb)
|
|||
UcpHandleByte(hf_ucp_parm_DCs);
|
||||
UcpHandleByte(hf_ucp_parm_MCLs);
|
||||
UcpHandleByte(hf_ucp_parm_RPI);
|
||||
if ((intval = tvb_get_guint8(tvb, offset++)) != '/') {
|
||||
if (tvb_get_guint8(tvb, offset++) != '/') {
|
||||
proto_tree_add_string(tree, hf_ucp_parm_CPg, tvb, offset - 1,1,
|
||||
"(reserved for Code Page)");
|
||||
offset++;
|
||||
}
|
||||
if ((intval = tvb_get_guint8(tvb, offset++)) != '/') {
|
||||
if (tvb_get_guint8(tvb, offset++) != '/') {
|
||||
proto_tree_add_string(tree, hf_ucp_parm_RPLy, tvb, offset - 1,1,
|
||||
"(reserved for Reply type)");
|
||||
offset++;
|
||||
|
|
|
@ -1515,7 +1515,7 @@ dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
|
|||
if(hf_sid==-1){
|
||||
/* if no tree, just return the offset of the end_of_SID+1 */
|
||||
if (!parent_tree)
|
||||
return(offset+=(6+(num_auth*4)));
|
||||
return(offset+(6+(num_auth*4)));
|
||||
|
||||
hf_sid=hf_nt_sid;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue