diff options
author | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-11-04 17:29:27 -0500 |
---|---|---|
committer | Youness Alaoui <kakaroto@kakaroto.(none)> | 2008-11-04 17:29:27 -0500 |
commit | f458e15dc5afdeb606128d51c46d47df52fbaf38 (patch) | |
tree | 6b114ba2715c8078218064069ed8a0c77ef8d61f | |
parent | 74a6062e8a1bcde58aa15f36a1e93036a5699f83 (diff) | |
download | libnice-f458e15dc5afdeb606128d51c46d47df52fbaf38.tar.gz |
use g_return_val_if_reached whenever possible
-rw-r--r-- | agent/address.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/agent/address.c b/agent/address.c index 7633248..a2622d5 100644 --- a/agent/address.c +++ b/agent/address.c @@ -160,7 +160,7 @@ nice_address_set_port (NiceAddress *addr, guint port) addr->s.ip6.sin6_port = htons (port); break; default: - g_assert_not_reached(); + g_return_if_reached (); } } @@ -179,7 +179,7 @@ nice_address_get_port (const NiceAddress *addr) return ntohs (addr->s.ip6.sin6_port); } - return 0; + g_return_val_if_reached (0); } @@ -224,7 +224,7 @@ nice_address_set_from_sockaddr (NiceAddress *addr, memcpy(&addr->s.ip6, sa, sizeof (addr->s.ip6)); break; default: - g_assert_not_reached(); + g_return_if_reached (); } } @@ -250,7 +250,7 @@ nice_address_copy_to_sockaddr (const NiceAddress *addr, memcpy (sin6, &addr->s.ip6, sizeof (*sin6)); break; default: - g_assert_not_reached (); + g_return_if_reached (); } } @@ -268,7 +268,7 @@ nice_address_to_string (const NiceAddress *addr, gchar *dst) INET6_ADDRSTRLEN); break; default: - g_assert_not_reached(); + g_return_if_reached (); } } @@ -291,7 +291,7 @@ nice_address_equal (const NiceAddress *a, const NiceAddress *b) && (a->s.ip6.sin6_scope_id == b->s.ip6.sin6_scope_id); } - return FALSE; + g_return_val_if_reached (FALSE); } @@ -358,7 +358,7 @@ nice_address_is_private (const NiceAddress *a) return ipv6_address_is_private (a->s.ip6.sin6_addr.s6_addr); } - return FALSE; + g_return_val_if_reached (FALSE); } |