summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-23 00:51:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-23 00:51:58 +0000
commiteb0d087ceca291caf25cadd8db540e988eecf633 (patch)
tree9a3505da452ea82ef8d9a4846ead79519db478d8 /lib
parenta1ad6fe881fb8ae1b32b37052bd0170c1364134c (diff)
Use fileno() instead of peeking into FILE *; Paul Stoeber
Diffstat (limited to 'lib')
-rw-r--r--lib/libpthread/uthread/uthread_file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libpthread/uthread/uthread_file.c b/lib/libpthread/uthread/uthread_file.c
index 40af6f084a5..b7a0552ccff 100644
--- a/lib/libpthread/uthread/uthread_file.c
+++ b/lib/libpthread/uthread/uthread_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_file.c,v 1.13 2007/05/18 19:28:50 kurt Exp $ */
+/* $OpenBSD: uthread_file.c,v 1.14 2008/03/23 00:51:57 deraadt Exp $ */
/*
* Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -180,7 +180,7 @@ flockfile(FILE * fp)
struct file_lock *p;
/* Check if this is a real file: */
- if (fp->_file >= 0) {
+ if (fileno(fp) >= 0) {
/* Lock the hash table: */
_SPINLOCK(&hash_lock);
@@ -245,7 +245,7 @@ ftrylockfile(FILE * fp)
struct file_lock *p;
/* Check if this is a real file: */
- if (fp->_file >= 0) {
+ if (fileno(fp) >= 0) {
/* Lock the hash table: */
_SPINLOCK(&hash_lock);
@@ -296,7 +296,7 @@ funlockfile(FILE * fp)
struct file_lock *p;
/* Check if this is a real file: */
- if (fp->_file >= 0) {
+ if (fileno(fp) >= 0) {
/*
* Defer signals to protect the scheduling queues from
* access by the signal handler: