diff options
author | 2006-10-03 16:06:52 +0000 | |
---|---|---|
committer | 2006-10-03 16:06:52 +0000 | |
commit | ffa3ffc02fd6baa2e54dd3816d78747b577ed488 (patch) | |
tree | f3d14085297dfb0c9b23483b6aa390f7c27c84da | |
parent | provide a summary of the available commands, since there's a ton of (diff) | |
download | wireguard-openbsd-ffa3ffc02fd6baa2e54dd3816d78747b577ed488.tar.xz wireguard-openbsd-ffa3ffc02fd6baa2e54dd3816d78747b577ed488.zip |
correct check for proper return value of dup2
-rw-r--r-- | regress/lib/libpthread/blocked_dup2/blocked_dup2.c | 4 | ||||
-rw-r--r-- | regress/lib/libpthread/dup2_race/dup2_race.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/regress/lib/libpthread/blocked_dup2/blocked_dup2.c b/regress/lib/libpthread/blocked_dup2/blocked_dup2.c index a79c6031a3c..0b4922387bd 100644 --- a/regress/lib/libpthread/blocked_dup2/blocked_dup2.c +++ b/regress/lib/libpthread/blocked_dup2/blocked_dup2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: blocked_dup2.c,v 1.1 2006/09/22 18:31:06 kurt Exp $ */ +/* $OpenBSD: blocked_dup2.c,v 1.2 2006/10/03 16:06:52 kurt Exp $ */ /* * Copyright (c) 2006 Kurt Miller <kurt@intricatesoftware.com> * @@ -104,7 +104,7 @@ main(int argc, char *argv[]) CHECKr(pthread_create(&waiting_threads[j], NULL, waiting_read, (void *)newfd)); nanosleep(&rqtp, NULL); - CHECKr(dup2(fd, newfd)); + CHECKe(dup2(fd, newfd)); for (j = 0; j < BUSY_THREADS; j++) { CHECKr(pthread_join(busy_threads[j], &value_ptr)); ASSERT(value_ptr == (void *)EBADF); diff --git a/regress/lib/libpthread/dup2_race/dup2_race.c b/regress/lib/libpthread/dup2_race/dup2_race.c index a19b871b700..faccc325a4f 100644 --- a/regress/lib/libpthread/dup2_race/dup2_race.c +++ b/regress/lib/libpthread/dup2_race/dup2_race.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dup2_race.c,v 1.1 2006/09/22 18:33:18 kurt Exp $ */ +/* $OpenBSD: dup2_race.c,v 1.2 2006/10/03 16:06:52 kurt Exp $ */ /* * Copyright (c) 2006 Kurt Miller <kurt@intricatesoftware.com> * @@ -70,7 +70,7 @@ main(int argc, char *argv[]) CHECKr(pthread_create(&busy_threads[j], NULL, busy_thread, (void *)newfd)); nanosleep(&rqtp, NULL); - CHECKr(dup2(fd, newfd)); + CHECKe(dup2(fd, newfd)); for (j = 0; j < BUSY_THREADS; j++) { CHECKr(pthread_join(busy_threads[j], &value_ptr)); ASSERT(value_ptr == (void *)EBADF); |