Remove noop __zipos_postdup

rc is never a zipos file because it is always a previously unused file
descriptor. fd is never a zipos file because that case has been handled
above by __zipos_fcntl.
This commit is contained in:
Jōshin 2023-12-01 04:35:07 +00:00
parent cd05ae7238
commit cfab8e3353
No known key found for this signature in database

View file

@ -28,7 +28,6 @@
#include "libc/intrin/strace.internal.h" #include "libc/intrin/strace.internal.h"
#include "libc/intrin/weaken.h" #include "libc/intrin/weaken.h"
#include "libc/runtime/zipos.internal.h" #include "libc/runtime/zipos.internal.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/f.h" #include "libc/sysv/consts/f.h"
#include "libc/sysv/errfuns.h" #include "libc/sysv/errfuns.h"
@ -126,10 +125,6 @@ int fcntl(int fd, int cmd, ...) {
END_CANCELATION_POINT; END_CANCELATION_POINT;
} else { } else {
rc = sys_fcntl(fd, cmd, arg, __sys_fcntl); rc = sys_fcntl(fd, cmd, arg, __sys_fcntl);
if (rc != -1 && (cmd == F_DUPFD || cmd == F_DUPFD_CLOEXEC) &&
__isfdkind(rc, kFdZip)) {
_weaken(__zipos_postdup)(fd, rc);
}
} }
} else { } else {
rc = sys_fcntl_nt(fd, cmd, arg); rc = sys_fcntl_nt(fd, cmd, arg);