Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-06-30 06:51:31 +0400
committerChristopher Faylor <me@cgf.cx>2005-06-30 06:51:31 +0400
commitd573a471af3908faf346e61d51e04944ca33a38e (patch)
tree2621f2ea444169baa58c15df8961634fd8e7dc87 /winsup/cygwin/thread.cc
parent87e8bd37a047298079ddc3ed3ed4d31b0ca6f152 (diff)
revert erroneous checkin
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r--winsup/cygwin/thread.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 2d5d273df..c0a55dc31 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -1771,8 +1771,7 @@ semaphore::_timedwait (const struct timespec *abstime)
struct timeval tv;
long waitlength;
- myfault efault;
- if (efault.faulted ())
+ if (__check_invalid_read_ptr (abstime, sizeof *abstime))
{
/* According to SUSv3, abstime need not be checked for validity,
if the semaphore can be locked immediately. */
@@ -3234,8 +3233,9 @@ semaphore::post (sem_t *sem)
int
semaphore::getvalue (sem_t *sem, int *sval)
{
- myfault efault;
- if (efault.faulted () || !is_good_object (sem))
+
+ if (!is_good_object (sem)
+ || __check_null_invalid_struct (sval, sizeof (int)))
{
set_errno (EINVAL);
return -1;