Commit 8e057c2f authored by Dafydd Harries's avatar Dafydd Harries

refactor readline flow control

darcs-hash:20070131145719-c9803-520db32925eb3206f0a411b1d630d75947e09e95.gz
parent 0d0f8fe7
......@@ -16,12 +16,12 @@ readline (guint fileno)
ret = read (fileno, buf + i, 1);
if (ret == -1)
return NULL;
break;
if (ret == 0 && i == 0)
{
/* EOF on first read */
return NULL;
break;
}
else if (ret == 0 || buf[i] == '\n')
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment