mgcp: fix Dead Store Found by Clang Analyzer

Although the value stored to 'tempchar' is used in the enclosing expression, the value is never actually read from 'tempchar'
This commit is contained in:
Alexis La Goutte 2021-01-12 09:42:34 +00:00 committed by AndersBroman
parent 7ef0bd34b0
commit 60cdc48efd
1 changed files with 3 additions and 3 deletions

View File

@ -853,18 +853,18 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf, mgcp
/* XRM/MCR */
else
if (len > (tvb_current_offset - offset) &&
(tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'R')
((guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'R')
{
/* Move past 'R' */
tvb_current_offset += 3;
if (len > (tvb_current_offset - offset) &&
(tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'R')
((guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'R')
{
*hf = &hf_mgcp_param_remotevoicemetrics;
}
else
if (len > (tvb_current_offset - offset) &&
(tempchar = (guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'L')
((guint8)g_ascii_toupper(tvb_get_guint8(tvb,tvb_current_offset))) == 'L')
{
*hf = &hf_mgcp_param_localvoicemetrics;
}