[glib-networking/mcatanzaro/base-rebase] tests: Simplify on_server_close_finish



commit 59f72ae46377edf3703632b716e25c3b0c7907cf
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Tue May 14 20:42:58 2019 -0500

    tests: Simplify on_server_close_finish
    
    Back to the way it was before....

 tls/tests/connection.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index cd7f375..19dc4b2 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -235,17 +235,12 @@ on_server_close_finish (GObject        *object,
   GError *error = NULL;
 
   g_io_stream_close_finish (G_IO_STREAM (object), res, &error);
+  g_assert_no_error (error);
 
   if (expected_error)
-    {
-      g_assert_error (test->server_error, expected_error->domain, expected_error->code);
-      g_assert_no_error (error);
-    }
+    g_assert_error (test->server_error, expected_error->domain, expected_error->code);
   else
-    {
-      g_assert_no_error (test->server_error);
-      g_assert_no_error (error);
-    }
+    g_assert_no_error (test->server_error);
 
   test->server_running = FALSE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]