diff --git a/src/mod/codecs/mod_ilbc/mod_ilbc.c b/src/mod/codecs/mod_ilbc/mod_ilbc.c index 14d67d372e..2588cdf46b 100644 --- a/src/mod/codecs/mod_ilbc/mod_ilbc.c +++ b/src/mod/codecs/mod_ilbc/mod_ilbc.c @@ -48,7 +48,7 @@ static switch_status_t switch_ilbc_fmtp_parse(const char *fmtp, switch_codec_fmt memset(codec_fmtp, '\0', sizeof(struct switch_codec_fmtp)); - if (fmtp && (mode = strstr(fmtp, "mode=")) && (mode + 5)) { + if (fmtp && (mode = strstr(fmtp, "mode=")) && *(mode + 5)) { codec_ms = atoi(mode + 5); } if (!codec_ms) { diff --git a/src/mod/databases/mod_mariadb/mod_mariadb.c b/src/mod/databases/mod_mariadb/mod_mariadb.c index 7926ec0c3f..5f32e8e90d 100644 --- a/src/mod/databases/mod_mariadb/mod_mariadb.c +++ b/src/mod/databases/mod_mariadb/mod_mariadb.c @@ -411,7 +411,7 @@ switch_status_t mariadb_finish_results_real(const char* file, const char* func, if ((status = mysql_next_result(&handle->con))) { if (status > 0) { err_str = mariadb_handle_get_error(handle); - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "An error occurred trying to get next for query (%s): %s\n", handle->sql, err_str); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "An error occurred trying to get next for query (%s): %s\n", handle->sql, switch_str_nil(err_str)); switch_safe_free(err_str); break; diff --git a/src/switch_core_media.c b/src/switch_core_media.c index e75387581d..0d8670622c 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -1170,7 +1170,7 @@ static uint32_t parse_lifetime_mki(const char **p, const char *end) val += ((**p) - '0') * i; } res |= (val & 0x000000ff); /* MKI_SIZE */ - } else if (isdigit(*(field_begin + 1)) && (field_begin + 2) && (*(field_begin + 2) == '^') && (field_begin + 3) && isdigit(*(field_begin + 3))) { + } else if (isdigit(*(field_begin + 1)) && (*(field_begin + 2) == '^') && isdigit(*(field_begin + 3))) { res |= (CRYPTO_KEY_MATERIAL_LIFETIME << 24); val = ((uint32_t) (*(field_begin + 1) - '0')) << 8; res |= val; /* LIFETIME base. */ diff --git a/src/switch_utils.c b/src/switch_utils.c index 332137ebda..7561835e69 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -2380,7 +2380,7 @@ SWITCH_DECLARE(int) switch_cmp_addr(switch_sockaddr_t *sa1, switch_sockaddr_t *s return (s1->sin_addr.s_addr == s2->sin_addr.s_addr && s1->sin_port == s2->sin_port); } case AF_INET6: - if (s16->sin6_addr.s6_addr && s26->sin6_addr.s6_addr) { + { int i; if (!ip_only) { @@ -2434,7 +2434,7 @@ SWITCH_DECLARE(int) switch_cp_addr(switch_sockaddr_t *sa1, switch_sockaddr_t *sa return 1; case AF_INET6: - if (s16->sin6_addr.s6_addr && s26->sin6_addr.s6_addr) { + { int i; s16->sin6_port = s26->sin6_port;