[Libsysio-commit] HEAD: libsysio/src rw.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2004-04-12 15:54:49
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13890/src Modified Files: rw.c Log Message: From Kevin Pedretti: Various rw routines returned a negated errno on errors. The _sysio_sum_iovec returns a count or negated errno. The internal helper routines were inverting this on error but indicating error themselves. The public interface routines would then invert the error number again before setting errno. The result; -1 * -1 * -n. Changed the helper routines to pass the error number untouched. Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -b -B -p -r1.4 -r1.5 --- rw.c 12 Apr 2004 15:36:06 -0000 1.4 +++ rw.c 12 Apr 2004 15:40:58 -0000 1.5 @@ -210,7 +210,7 @@ _sysio_iiov(int (*f)(struct inode *, str cc = _sysio_sum_iovec(iov, count); if (cc < 0) - return (int )-cc; + return (int )cc; xtv->xtv_off = fil->f_pos; xtv->xtv_len = cc; off = xtv->xtv_off + xtv->xtv_len; @@ -442,7 +442,7 @@ _sysio_ipiov(int (*f)(struct inode *, st cc = _sysio_sum_iovec(iov, count); if (cc < 0) { SYSIO_LEAVE; - return (int )-cc; + return (int )cc; } xtv->xtv_off = off, xtv->xtv_len = cc; |