summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-03-23 00:51:57 +0000
committerderaadt <deraadt@openbsd.org>2008-03-23 00:51:57 +0000
commita6e29993465b0842ad4de94b1266c60f9906ca5f (patch)
tree85abd9f6f4b69903d81d1ee792402ccb35ebe086 /lib/libpthread
parentNo point in checking disklabel output for 'disk label corrupted' message (diff)
downloadwireguard-openbsd-a6e29993465b0842ad4de94b1266c60f9906ca5f.tar.xz
wireguard-openbsd-a6e29993465b0842ad4de94b1266c60f9906ca5f.zip
Use fileno() instead of peeking into FILE *; Paul Stoeber
Diffstat (limited to 'lib/libpthread')
-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: