[Pkg-telepathy-commits] [libnice] 226/265: component: Remove return value from *_restart() functions, they can't fail
Simon McVittie
smcv at debian.org
Wed May 14 12:05:11 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository libnice.
commit 6c89354606f08590458f8c7c9b952cd04e2fb3cf
Author: Olivier Crête <olivier.crete at collabora.com>
Date: Tue Apr 15 19:54:45 2014 -0400
component: Remove return value from *_restart() functions, they can't fail
---
agent/agent.c | 7 +++----
agent/component.c | 4 +---
agent/component.h | 2 +-
agent/stream.c | 11 ++++-------
agent/stream.h | 2 +-
5 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/agent/agent.c b/agent/agent.c
index 23ce78e..d000877 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -3695,7 +3695,6 @@ nice_agent_restart (
NiceAgent *agent)
{
GSList *i;
- gboolean res = TRUE;
agent_lock();
@@ -3705,16 +3704,16 @@ nice_agent_restart (
/* step: regenerate tie-breaker value */
priv_generate_tie_breaker (agent);
- for (i = agent->streams; i && res; i = i->next) {
+ for (i = agent->streams; i; i = i->next) {
Stream *stream = i->data;
/* step: reset local credentials for the stream and
* clean up the list of remote candidates */
- res = stream_restart (stream, agent->rng);
+ stream_restart (stream, agent->rng);
}
agent_unlock_and_emit (agent);
- return res;
+ return TRUE;
}
diff --git a/agent/component.c b/agent/component.c
index b4dd95f..9c2ab43 100644
--- a/agent/component.c
+++ b/agent/component.c
@@ -276,7 +276,7 @@ component_find_pair (Component *cmp, NiceAgent *agent, const gchar *lfoundation,
* Resets the component state to that of a ICE restarted
* session.
*/
-gboolean
+void
component_restart (Component *cmp)
{
GSList *i;
@@ -307,8 +307,6 @@ component_restart (Component *cmp)
cmp->incoming_checks = NULL;
/* note: component state managed by agent */
-
- return TRUE;
}
/*
diff --git a/agent/component.h b/agent/component.h
index 5060a9c..6f464ed 100644
--- a/agent/component.h
+++ b/agent/component.h
@@ -214,7 +214,7 @@ component_free (Component *cmp);
gboolean
component_find_pair (Component *cmp, NiceAgent *agent, const gchar *lfoundation, const gchar *rfoundation, CandidatePair *pair);
-gboolean
+void
component_restart (Component *cmp);
void
diff --git a/agent/stream.c b/agent/stream.c
index f649dca..245bba7 100644
--- a/agent/stream.c
+++ b/agent/stream.c
@@ -132,22 +132,19 @@ void stream_initialize_credentials (Stream *stream, NiceRNG *rng)
* Resets the stream state to that of a ICE restarted
* session.
*/
-gboolean
+void
stream_restart (Stream *stream, NiceRNG *rng)
{
GSList *i;
- gboolean res = TRUE;
stream->initial_binding_request_received = FALSE;
stream_initialize_credentials (stream, rng);
- for (i = stream->components; i && res; i = i->next) {
+ for (i = stream->components; i; i = i->next) {
Component *component = i->data;
-
- res = component_restart (component);
+
+ component_restart (component);
}
-
- return res;
}
diff --git a/agent/stream.h b/agent/stream.h
index 96a478b..3d2d2db 100644
--- a/agent/stream.h
+++ b/agent/stream.h
@@ -92,7 +92,7 @@ stream_find_component_by_id (const Stream *stream, guint id);
void
stream_initialize_credentials (Stream *stream, NiceRNG *rng);
-gboolean
+void
stream_restart (Stream *stream, NiceRNG *rng);
G_END_DECLS
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git
More information about the Pkg-telepathy-commits
mailing list