~mdw
/
mLib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3bc4291
)
Actually implement the right transformation!
author
mdw
<mdw>
Tue, 18 Oct 2005 08:44:02 +0000
(08:44 +0000)
committer
mdw
<mdw>
Tue, 18 Oct 2005 08:44:02 +0000
(08:44 +0000)
fdflags.c
patch
|
blob
|
blame
|
history
diff --git
a/fdflags.c
b/fdflags.c
index
6f401e4
..
6e0cb0e
100644
(file)
--- a/
fdflags.c
+++ b/
fdflags.c
@@
-59,14
+59,14
@@
int fdflags(int fd, unsigned fbic, unsigned fxor,
if (fbic || fxor) {
if ((f = fcntl(fd, F_GETFL)) == -1)
return (-1);
if (fbic || fxor) {
if ((f = fcntl(fd, F_GETFL)) == -1)
return (-1);
- ff = (f & fbic) ^ fxor;
+ ff = (f &
~
fbic) ^ fxor;
if (f != ff && fcntl(fd, F_SETFL, ff) == -1)
return (-1);
}
if (fdbic || fdxor) {
if ((f = fcntl(fd, F_GETFD)) == -1)
return (-1);
if (f != ff && fcntl(fd, F_SETFL, ff) == -1)
return (-1);
}
if (fdbic || fdxor) {
if ((f = fcntl(fd, F_GETFD)) == -1)
return (-1);
- ff = (f & fdbic) ^ fdxor;
+ ff = (f &
~
fdbic) ^ fdxor;
if (f != ff && fcntl(fd, F_SETFD, ff) == -1)
return (-1);
}
if (f != ff && fcntl(fd, F_SETFD, ff) == -1)
return (-1);
}