mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
Various little cleanups, many of them from a clang static analysis
This commit is contained in:
@@ -463,7 +463,6 @@ static int parse_hex_num(const char **s, int max_value)
|
||||
|
||||
/* The spec. says a hex value is always 2 digits, and the alpha digits are
|
||||
upper case. */
|
||||
i = 0;
|
||||
if (isdigit((int) **s))
|
||||
i = **s - '0';
|
||||
else if (**s >= 'A' && **s <= 'F')
|
||||
@@ -912,7 +911,6 @@ static const char *at_cmd_dummy(at_state_t *s, const char *t)
|
||||
static const char *at_cmd_A(at_state_t *s, const char *t)
|
||||
{
|
||||
/* V.250 6.3.5 - Answer (abortable) */
|
||||
t += 1;
|
||||
if (!answer_call(s))
|
||||
return NULL;
|
||||
return (const char *) -1;
|
||||
@@ -921,7 +919,6 @@ static const char *at_cmd_A(at_state_t *s, const char *t)
|
||||
|
||||
static const char *at_cmd_D(at_state_t *s, const char *t)
|
||||
{
|
||||
int ok;
|
||||
char *u;
|
||||
char num[100 + 1];
|
||||
char ch;
|
||||
@@ -932,7 +929,6 @@ static const char *at_cmd_D(at_state_t *s, const char *t)
|
||||
s->silent_dial = false;
|
||||
s->command_dial = false;
|
||||
t += 1;
|
||||
ok = false;
|
||||
/* There are a numbers of options in a dial command string.
|
||||
Many are completely irrelevant in this application. */
|
||||
u = num;
|
||||
@@ -1024,7 +1020,7 @@ static const char *at_cmd_D(at_state_t *s, const char *t)
|
||||
}
|
||||
}
|
||||
*u = '\0';
|
||||
if ((ok = at_modem_control(s, AT_MODEM_CONTROL_CALL, num)) < 0)
|
||||
if (at_modem_control(s, AT_MODEM_CONTROL_CALL, num) < 0)
|
||||
return NULL;
|
||||
/* Dialing should now be in progress. No AT response should be
|
||||
issued at this point. */
|
||||
|
Reference in New Issue
Block a user