From: Andre Noll Date: Tue, 29 Dec 2009 00:14:50 +0000 (+0100) Subject: stdin: Fix a signed bug. X-Git-Tag: v0.4.2~63^2~1^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=40af26f7f363ee8806874c470cd6338f4f934efa;hp=ac6cf1cb1b7013422360f703f82c92716376de3a stdin: Fix a signed bug. We have to return a negative error code. --- diff --git a/stdin.c b/stdin.c index c683b560..14201a9a 100644 --- 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