[Pkg-telepathy-commits] [libnice] 212/265: tcp-bsd: Don't clear error that hasn't been set

Simon McVittie smcv at debian.org
Wed May 14 12:05:09 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 1c4aeec310b22e7f93d4386da1582f79181e57cd
Author: Olivier Crête <olivier.crete at collabora.com>
Date:   Wed Apr 2 11:25:27 2014 -0400

    tcp-bsd: Don't clear error that hasn't been set
---
 socket/tcp-bsd.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/socket/tcp-bsd.c b/socket/tcp-bsd.c
index c6f50a0..79a0918 100644
--- a/socket/tcp-bsd.c
+++ b/socket/tcp-bsd.c
@@ -393,8 +393,7 @@ socket_send_more (
     }
 
     if (ret < 0) {
-      if (gerr != NULL &&
-          g_error_matches (gerr, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) {
+      if (g_error_matches (gerr, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) {
         GOutputVector local_buf = { tbs->buf, tbs->length };
         NiceOutputMessage local_message = {&local_buf, 1};
 
@@ -403,7 +402,7 @@ socket_send_more (
         g_error_free (gerr);
         break;
       }
-      g_error_free (gerr);
+      g_clear_error (&gerr);
     } else if (ret < (int) tbs->length) {
       GOutputVector local_buf = { tbs->buf + ret, tbs->length - ret };
       NiceOutputMessage local_message = {&local_buf, 1};

-- 
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