diff options
author | 2006-09-23 12:25:58 +0000 | |
---|---|---|
committer | 2006-09-23 12:25:58 +0000 | |
commit | 9ee223c1090ffc410f7d200c29ea330c2482678f (patch) | |
tree | 96ae15e315c5673cffad6d6f5a5ad75b7efcf5f0 /lib/libpthread/uthread | |
parent | If fgetln() != NULL, len == 0 is impossible, so remove check. (diff) | |
download | wireguard-openbsd-9ee223c1090ffc410f7d200c29ea330c2482678f.tar.xz wireguard-openbsd-9ee223c1090ffc410f7d200c29ea330c2482678f.zip |
fix a bug where the logic was reversed
Diffstat (limited to 'lib/libpthread/uthread')
-rw-r--r-- | lib/libpthread/uthread/uthread_fd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/uthread_fd.c b/lib/libpthread/uthread/uthread_fd.c index 9cfae2af508..666b94ab20d 100644 --- a/lib/libpthread/uthread/uthread_fd.c +++ b/lib/libpthread/uthread/uthread_fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_fd.c,v 1.23 2006/09/22 19:04:33 kurt Exp $ */ +/* $OpenBSD: uthread_fd.c,v 1.24 2006/09/23 12:25:58 kurt Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -139,7 +139,7 @@ _thread_fs_flags_replace(int fd, struct fs_flags *new_status_flags) * Also don't reset fd to blocking if we are replacing * the status flags with a shared version. */ - if (new_status_flags != NULL && + if (new_status_flags == NULL && (_thread_sys_fstat(fd, &sb) == 0) && ((S_ISREG(sb.st_mode) || S_ISCHR(sb.st_mode)) && (old_status_flags->flags & O_NONBLOCK) == 0)) |