From 9dd3942c88b79bd9f64fd497bf8dd21ed7794c66 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 21 Jul 2012 16:17:53 +0200 Subject: [PATCH] Minor cosmetics for util.c too --- src/common/util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/util.c b/src/common/util.c index 8a8adf02..35c768d2 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -399,8 +399,11 @@ waitline2 (GIOChannel *source, char *buf, int bufsize) { g_io_channel_set_buffered (source, FALSE); g_io_channel_set_encoding (source, NULL, &error); + if (g_io_channel_read_chars (source, &buf[i], 1, &len, &error) != G_IO_STATUS_NORMAL) + { return -1; + } if (buf[i] == '\n' || bufsize == i + 1) { buf[i] = 0;