]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Minor improvement.
authorNicholas Nethercote <njn@valgrind.org>
Thu, 12 Jun 2003 10:23:58 +0000 (10:23 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Thu, 12 Jun 2003 10:23:58 +0000 (10:23 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1678

coregrind/vg_scheduler.c

index 1e086b382895bd903789baceaddd1dab4435987a..70bf63f14104936eab715122856bb24b72348b99 100644 (file)
@@ -2076,9 +2076,7 @@ void do_pthread_join ( ThreadId tid,
    maybe_rendezvous_joiners_and_joinees();
 
    /* Is this a sane request? */
-   if (jee < 0 
-       || jee >= VG_N_THREADS
-       || VG_(threads)[jee].status == VgTs_Empty) {
+   if ( ! VG_(is_valid_tid)(jee) ) {
       /* Invalid thread to join to. */
       VG_(record_pthread_error)( tid, 
          "pthread_join: target thread does not exist, or invalid");