mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 17:22:21 +00:00
fix windows code analysis problems
This commit is contained in:
parent
3aff2bdcbc
commit
55c24567bd
@ -1053,6 +1053,7 @@ static int add_array(esl_event_t *event, const char *var, const char *val)
|
|||||||
data = strdup(val + 7);
|
data = strdup(val + 7);
|
||||||
|
|
||||||
len = (sizeof(char *) * max) + 1;
|
len = (sizeof(char *) * max) + 1;
|
||||||
|
esl_assert(len == 0);
|
||||||
array = malloc(len);
|
array = malloc(len);
|
||||||
memset(array, 0, len);
|
memset(array, 0, len);
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ ESL_DECLARE(esl_status_t) esl_event_del_header_val(esl_event_t *event, const cha
|
|||||||
esl_assert(x < 1000000);
|
esl_assert(x < 1000000);
|
||||||
hash = esl_ci_hashfunc_default(header_name, &hlen);
|
hash = esl_ci_hashfunc_default(header_name, &hlen);
|
||||||
|
|
||||||
if ((!hp->hash || hash == hp->hash) && !strcasecmp(header_name, hp->name) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
|
if ((!hp->hash || hash == hp->hash) && (hp->name && !strcasecmp(header_name, hp->name)) && (esl_strlen_zero(val) || !strcmp(hp->value, val))) {
|
||||||
if (lp) {
|
if (lp) {
|
||||||
lp->next = hp->next;
|
lp->next = hp->next;
|
||||||
} else {
|
} else {
|
||||||
@ -625,6 +625,8 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
|
|||||||
|
|
||||||
dlen = blocksize * 2;
|
dlen = blocksize * 2;
|
||||||
|
|
||||||
|
esl_assert(dlen == 0);
|
||||||
|
|
||||||
if (!(buf = malloc(dlen))) {
|
if (!(buf = malloc(dlen))) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_set_priority(switch_event_t *event,
|
|||||||
\return the value of the requested header
|
\return the value of the requested header
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_Ret_opt_z_ SWITCH_DECLARE(switch_event_header_t *) switch_event_get_header_ptr(switch_event_t *event, const char *header_name);
|
SWITCH_DECLARE(switch_event_header_t *) switch_event_get_header_ptr(switch_event_t *event, const char *header_name);
|
||||||
_Ret_opt_z_ SWITCH_DECLARE(char *) switch_event_get_header_idx(switch_event_t *event, const char *header_name, int idx);
|
_Ret_opt_z_ SWITCH_DECLARE(char *) switch_event_get_header_idx(switch_event_t *event, const char *header_name, int idx);
|
||||||
#define switch_event_get_header(_e, _h) switch_event_get_header_idx(_e, _h, -1)
|
#define switch_event_get_header(_e, _h) switch_event_get_header_idx(_e, _h, -1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user