diff options
author | jb <jb@FreeBSD.org> | 2004-03-09 04:51:58 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 2004-03-09 04:51:58 +0000 |
commit | c50fc65e967468cd4127f2e70b9c64cdfa036511 (patch) | |
tree | d8afb4ad13d20afe3d08e02e936f32023a514304 /lib/libc/stdio/_flock_stub.c | |
parent | 4c2f4222e3453cca9ac48c23b80bfb872cc0f49e (diff) | |
download | FreeBSD-src-c50fc65e967468cd4127f2e70b9c64cdfa036511.zip FreeBSD-src-c50fc65e967468cd4127f2e70b9c64cdfa036511.tar.gz |
Backout the previous revision due to objections.
Diffstat (limited to 'lib/libc/stdio/_flock_stub.c')
-rw-r--r-- | lib/libc/stdio/_flock_stub.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/libc/stdio/_flock_stub.c b/lib/libc/stdio/_flock_stub.c index 1b79ce2..8abc8e3 100644 --- a/lib/libc/stdio/_flock_stub.c +++ b/lib/libc/stdio/_flock_stub.c @@ -73,9 +73,7 @@ _flockfile(FILE *fp) { pthread_t curthread = _pthread_self(); - if (fp->_lock == NULL) { - } - else if (fp->_lock->fl_owner == curthread) + if (fp->_lock->fl_owner == curthread) fp->_lock->fl_count++; else { /* @@ -103,9 +101,7 @@ _ftrylockfile(FILE *fp) pthread_t curthread = _pthread_self(); int ret = 0; - if (fp->_lock == NULL) { - } - else if (fp->_lock->fl_owner == curthread) + if (fp->_lock->fl_owner == curthread) fp->_lock->fl_count++; /* * Make sure this mutex is treated as a private @@ -125,12 +121,10 @@ _funlockfile(FILE *fp) { pthread_t curthread = _pthread_self(); - if (fp->_lock == NULL) { - } /* * Check if this file is owned by the current thread: */ - else if (fp->_lock->fl_owner == curthread) { + if (fp->_lock->fl_owner == curthread) { /* * Check if this thread has locked the FILE * more than once: |