stdin: Fix a signed bug.
[paraslash.git] / stdin.c
diff --git a/stdin.c b/stdin.c
index fea30dd90ca0e493bb6f4ce54f1515ea072761dc..14201a9a6ccc757a26fd437ea2fa7ca24c95c8de 100644 (file)
--- a/stdin.c
+++ b/stdin.c
@@ -71,7 +71,7 @@ static void stdin_post_select(struct sched *s, struct task *t)
                return;
        ret = read(STDIN_FILENO, sit->buf + sit->loaded, sit->bufsize - sit->loaded);
        if (ret < 0)
-               t->error = ERRNO_TO_PARA_ERROR(errno);
+               t->error = -ERRNO_TO_PARA_ERROR(errno);
        else if (ret > 0)
                sit->loaded += ret;
        else
@@ -91,7 +91,7 @@ void stdin_set_defaults(struct stdin_task *sit)
 {
        int ret;
 
-       sit->bufsize = 16 * 1024,
+       sit->bufsize = 32 * 1024,
        sit->task.pre_select = stdin_pre_select;
        sit->task.post_select = stdin_post_select;
        sprintf(sit->task.status, "stdin reader");