$NetBSD: patch-ae,v 1.2 2003/04/15 12:19:19 wiz Exp $ --- examples/hfetch.c.orig Mon Feb 3 20:01:56 2003 +++ examples/hfetch.c @@ -114,6 +114,7 @@ hfetch(gchar* server, gint port, gchar* gchar buffer[1024]; GIOError error; guint n; + gsize n2; /* Create the address */ @@ -142,17 +143,17 @@ hfetch(gchar* server, gint port, gchar* /* Read the output */ while (1) { - error = g_io_channel_read(iochannel, buffer, sizeof(buffer), &n); + error = g_io_channel_read(iochannel, buffer, sizeof(buffer), &n2); if (error != G_IO_ERROR_NONE) { g_warning("Read error: %d\n", error); break; } - if (n == 0) + if (n2 == 0) break; - fwrite(buffer, n, 1, stdout); + fwrite(buffer, n2, 1, stdout); } gnet_tcp_socket_delete(socket);