[Libsysio-commit] HEAD: libsysio/src rw.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-05-01 15:53:10
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv7814 Modified Files: rw.c Log Message: Use the check file for read/write access macro instead of the expansion. Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- rw.c 30 Apr 2007 19:36:44 -0000 1.19 +++ rw.c 1 May 2007 15:53:05 -0000 1.20 @@ -222,8 +222,7 @@ _sysio_iiox(int writing, /* * Opened for proper access? */ - if ((writing && !(fil->f_flags & (O_WRONLY | O_RDWR))) || - (!writing && fil->f_flags & O_WRONLY)) { + if (!F_CHKRW(fil, writing ? 'w' : 'r')) { err = -EBADF; break; } |