Commit ac657a0f authored by Dafydd Harries's avatar Dafydd Harries
Browse files

remove unnecessary casts from void *

darcs-hash:20070129162038-c9803-fe8e0d4d7a711d27280df2d1600da85e239c27e1.gz
parent a54f4aac
......@@ -192,7 +192,7 @@ nice_agent_pop_event (NiceAgent *agent)
return NULL;
head = agent->events;
event = (Event *) head->data;
event = head->data;
agent->events = head->next;
g_slist_free_1 (head);
return event;
......@@ -251,7 +251,7 @@ nice_agent_add_stream (
for (i = agent->local_addresses; i; i = i->next)
{
NiceAddress *addr = (NiceAddress *) i->data;
NiceAddress *addr = i->data;
nice_agent_add_local_host_candidate (agent, stream->id,
stream->component->id, addr);
......@@ -308,7 +308,7 @@ _local_candidate_lookup (NiceAgent *agent, guint candidate_id)
for (i = agent->local_candidates; i; i = i->next)
{
NiceCandidate *c = (NiceCandidate *) i->data;
NiceCandidate *c = i->data;
if (c->id == candidate_id)
return c;
......@@ -325,7 +325,7 @@ _stream_lookup (NiceAgent *agent, guint stream_id)
for (i = agent->streams; i; i = i->next)
{
Stream *s = (Stream *) i->data;
Stream *s = i->data;
if (s->id == stream_id)
return s;
......@@ -470,7 +470,7 @@ nice_agent_free (NiceAgent *agent)
for (i = agent->local_addresses; i; i = i->next)
{
NiceAddress *a = (NiceAddress *) i->data;
NiceAddress *a = i->data;
nice_address_free (a);
}
......@@ -480,7 +480,7 @@ nice_agent_free (NiceAgent *agent)
for (i = agent->local_candidates; i; i = i->next)
{
NiceCandidate *c = (NiceCandidate *) i->data;
NiceCandidate *c = i->data;
nice_candidate_free (c);
}
......@@ -490,7 +490,7 @@ nice_agent_free (NiceAgent *agent)
for (i = agent->remote_candidates; i; i = i->next)
{
NiceCandidate *c = (NiceCandidate *) i->data;
NiceCandidate *c = i->data;
nice_candidate_free (c);
}
......@@ -500,7 +500,7 @@ nice_agent_free (NiceAgent *agent)
for (i = agent->streams; i; i = i->next)
{
Stream *s = (Stream *) i->data;
Stream *s = i->data;
stream_free (s);
}
......
......@@ -48,7 +48,7 @@ main (void)
g_assert (agent->local_candidates != NULL);
/* recieve an RTP packet */
candidate = (NiceCandidate *) agent->local_candidates->data;
candidate = agent->local_candidates->data;
sock = &(candidate->sock);
udp_fake_socket_push_recv (sock, &from, 7, "\x80lalala");
nice_agent_recv (agent, candidate->id);
......
......@@ -53,7 +53,7 @@ main (void)
nice_agent_add_local_address (agent, &local_addr);
nice_agent_add_stream (agent, handle_recv);
g_assert (agent->local_candidates != NULL);
candidate = (NiceCandidate *) agent->local_candidates->data;
candidate = agent->local_candidates->data;
sock = &(candidate->sock);
/* send binding request */
......
......@@ -43,8 +43,7 @@ main (void)
g_assert (agent->local_addresses != NULL);
g_assert (g_slist_length (agent->local_addresses) == 1);
g_assert (nice_address_equal ((NiceAddress *) agent->local_addresses->data,
&addr_local));
g_assert (nice_address_equal (agent->local_addresses->data, &addr_local));
/* no candidates should be generated until we have a stream */
g_assert (agent->local_candidates == NULL);
......@@ -55,7 +54,7 @@ main (void)
/* adding a stream should cause host candidates to be generated */
g_assert (agent->local_candidates != NULL);
g_assert (g_slist_length (agent->local_candidates) == 1);
candidate = (NiceCandidate *) agent->local_candidates->data;
candidate = agent->local_candidates->data;
g_assert (nice_address_equal (&(candidate->addr), &addr_local));
g_assert (candidate->id == 1);
/* fake socket manager uses incremental port numbers starting at 1 */
......@@ -66,7 +65,7 @@ main (void)
&addr_remote, 2345);
g_assert (agent->remote_candidates != NULL);
g_assert (g_slist_length (agent->remote_candidates) == 1);
candidate = (NiceCandidate *) agent->remote_candidates->data;
candidate = agent->remote_candidates->data;
g_assert (nice_address_equal (&(candidate->addr), &addr_remote));
g_assert (candidate->port == 2345);
......
......@@ -44,7 +44,7 @@ make_agent (
nice_agent_add_stream (agent, handle_recv);
g_assert (agent->local_candidates != NULL);
candidate = (NiceCandidate *) agent->local_candidates->data;
candidate = agent->local_candidates->data;
g_debug ("allocated socket %d port %d for candidate %d",
candidate->sock.fileno, ntohs (candidate->sock.addr.sin_port),
candidate->id);
......@@ -93,7 +93,7 @@ handle_connection (guint fileno, const struct sockaddr_in *sin, gpointer data)
/* send first local candidate to remote end */
candidate_str = nice_candidate_to_string (
(NiceCandidate *) nice_agent_get_local_candidates (agent)->data);
nice_agent_get_local_candidates (agent)->data);
send (fileno, candidate_str, strlen (candidate_str), 0);
send (fileno, "\n", 1, 0);
g_free (candidate_str);
......@@ -144,7 +144,7 @@ END:
while (sockets != NULL)
{
GSList *tmp;
UDPSocket *sock = (UDPSocket *) sockets->data;
UDPSocket *sock = sockets->data;
tmp = sockets;
sockets = sockets->next;
......
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