Minor cosmetics for util.c too
This commit is contained in:
parent
92cb1dc12c
commit
9dd3942c88
@ -399,8 +399,11 @@ waitline2 (GIOChannel *source, char *buf, int bufsize)
|
|||||||
{
|
{
|
||||||
g_io_channel_set_buffered (source, FALSE);
|
g_io_channel_set_buffered (source, FALSE);
|
||||||
g_io_channel_set_encoding (source, NULL, &error);
|
g_io_channel_set_encoding (source, NULL, &error);
|
||||||
|
|
||||||
if (g_io_channel_read_chars (source, &buf[i], 1, &len, &error) != G_IO_STATUS_NORMAL)
|
if (g_io_channel_read_chars (source, &buf[i], 1, &len, &error) != G_IO_STATUS_NORMAL)
|
||||||
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
if (buf[i] == '\n' || bufsize == i + 1)
|
if (buf[i] == '\n' || bufsize == i + 1)
|
||||||
{
|
{
|
||||||
buf[i] = 0;
|
buf[i] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user