summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-08-25 23:42:36 +0000
committerMiles Bader <miles@gnu.org>1997-08-25 23:42:36 +0000
commit9f05d04d79fa07b54e7a21f9970008c3af031063 (patch)
tree665ea92482e28a2aa48aefa3d4250521ba973b2b
parentae82afd2b95102678633921ae848ab47cd6acecc (diff)
(S_io_write):
Negate linux error codes before returning.
-rw-r--r--pfinet/io-ops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c
index 72895065..147e52b0 100644
--- a/pfinet/io-ops.c
+++ b/pfinet/io-ops.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -46,7 +46,9 @@ S_io_write (struct sock_user *user,
user->sock->userflags);
mutex_unlock (&global_lock);
- if (err >= 0)
+ if (err < 0)
+ err = -err;
+ else
{
*amount = err;
err = 0;