mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +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);
|
||||
|
||||
len = (sizeof(char *) * max) + 1;
|
||||
esl_assert(len == 0);
|
||||
array = malloc(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);
|
||||
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) {
|
||||
lp->next = hp->next;
|
||||
} else {
|
||||
@ -625,6 +625,8 @@ ESL_DECLARE(esl_status_t) esl_event_serialize(esl_event_t *event, char **str, es
|
||||
|
||||
dlen = blocksize * 2;
|
||||
|
||||
esl_assert(dlen == 0);
|
||||
|
||||
if (!(buf = malloc(dlen))) {
|
||||
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
|
||||
*/
|
||||
|
||||
_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);
|
||||
#define switch_event_get_header(_e, _h) switch_event_get_header_idx(_e, _h, -1)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user