Commit 25c8b837 authored by Youness Alaoui's avatar Youness Alaoui

only define variables at the start of blocks

parent 18e925b0
......@@ -924,9 +924,10 @@ nice_agent_gather_candidates (
agent->stun_server_ip) {
NiceAddress stun_server;
if (nice_address_set_from_string (&stun_server, agent->stun_server_ip)) {
gboolean res;
nice_address_set_port (&stun_server, agent->stun_server_port);
gboolean res =
res =
priv_add_new_candidate_discovery_stun (agent,
host_candidate,
stun_server,
......@@ -1212,10 +1213,11 @@ nice_agent_add_remote_candidate (
const gchar *username,
const gchar *password)
{
gboolean ret;
g_static_rec_mutex_lock (&agent->mutex);
gboolean ret =
ret =
priv_add_remote_candidate (agent,
stream_id,
component_id,
......
......@@ -73,8 +73,8 @@ uint32_t stun_fingerprint (const uint8_t *msg, size_t len)
bool stun_has_cookie (const StunMessage *msg)
{
stun_transid_t id;
stun_message_id (msg, id);
uint32_t cookie = htonl (STUN_MAGIC_COOKIE);
stun_message_id (msg, id);
return memcmp (id, &cookie, sizeof (cookie)) == 0;
}
......
......@@ -101,8 +101,8 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len,
{
EVP_MD_CTX ctx;
const uint8_t *username_trimmed = priv_trim_var (username, &username_len);
const uint8_t *password_trimmed = priv_trim_var (password, &password_len);;
const uint8_t *realm_trimmed = priv_trim_var (realm, &realm_len);;
const uint8_t *password_trimmed = priv_trim_var (password, &password_len);
const uint8_t *realm_trimmed = priv_trim_var (realm, &realm_len);
EVP_MD_CTX_init (&ctx);
EVP_DigestInit_ex (&ctx, EVP_md5 (), NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment