[Swfdec] [PATCH] Fix a warning in test/swfdec_test_socket.c

Pavel Roskin proski at gnu.org
Sun Feb 3 19:17:59 PST 2008


Variable "written" is unused.  Use it the way it was likely meant to be
used.
---

 test/swfdec_test_socket.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/swfdec_test_socket.c b/test/swfdec_test_socket.c
index 036bd7e..76feb95 100644
--- a/test/swfdec_test_socket.c
+++ b/test/swfdec_test_socket.c
@@ -192,13 +192,13 @@ swfdec_test_socket_receive (SwfdecAsContext *cx, SwfdecAsObject *object, guint a
   swfdec_test_socket_process (sock);
   if (len > 0) {
     buffer = swfdec_buffer_new_and_alloc (len);
-    if (soup_socket_read (sock->socket, buffer->data, buffer->length, &len,
+    if (soup_socket_read (sock->socket, buffer->data, buffer->length, &written,
 	  NULL, &error) != SOUP_SOCKET_OK) {
       swfdec_test_throw (cx, "%s", error->message);
       g_error_free (error);
       swfdec_buffer_unref (buffer);
       return;
-    } else if (buffer->length != len) {
+    } else if (buffer->length != written) {
       swfdec_test_throw (cx, "only read %u bytes of %u", written, buffer->length);
       swfdec_buffer_unref (buffer);
       return;


More information about the Swfdec mailing list