summaryrefslogtreecommitdiff
path: root/agent
diff options
context:
space:
mode:
authorYouness Alaoui <kakaroto@kakaroto.(none)>2008-11-03 16:31:09 -0500
committerYouness Alaoui <kakaroto@kakaroto.(none)>2008-11-03 16:31:09 -0500
commit18e925b0ead0c93887b313b0a1a4ab5358cd94f2 (patch)
tree5ccf04e220a71183bffa6f1fa8c98737a5461d2a /agent
parent753b61bd6980cd6ac495c51f5d7c5b04a1aadedb (diff)
downloadlibnice-18e925b0ead0c93887b313b0a1a4ab5358cd94f2.tar.gz
fix error with 'not all code paths return a value'
Diffstat (limited to 'agent')
-rw-r--r--agent/address.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/agent/address.c b/agent/address.c
index 7d390d8..c5a6fa0 100644
--- a/agent/address.c
+++ b/agent/address.c
@@ -107,7 +107,8 @@ nice_address_set_port (NiceAddress *addr, guint port)
guint
nice_address_get_port (const NiceAddress *addr)
{
- g_assert (addr);
+ if (!addr)
+ return 0;
switch (addr->s.addr.sa_family)
{
@@ -117,7 +118,7 @@ nice_address_get_port (const NiceAddress *addr)
return ntohs (addr->s.ip6.sin6_port);
}
- g_assert_not_reached();
+ return 0;
}
@@ -266,7 +267,7 @@ nice_address_equal (const NiceAddress *a, const NiceAddress *b)
&& (a->s.ip6.sin6_scope_id == b->s.ip6.sin6_scope_id);
}
- g_assert_not_reached ();
+ return FALSE;
}
@@ -333,7 +334,7 @@ nice_address_is_private (const NiceAddress *a)
return ipv6_address_is_private (a->s.ip6.sin6_addr.s6_addr);
}
- g_assert_not_reached ();
+ return FALSE;
}