diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-08-23 04:26:06 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-08-23 04:26:06 +0000 |
commit | 254f7200ee45570299fcd3d272dd82c49fed6ef3 (patch) | |
tree | d90832bf8c6361a8d493528d88413c9e56afcb7f /regress/lib/libc_r/cancel/cancel.c | |
parent | 2f85919fc122b831358535e79384969cd14e897c (diff) |
while im here, remove -Wall warnings.
Diffstat (limited to 'regress/lib/libc_r/cancel/cancel.c')
-rw-r--r-- | regress/lib/libc_r/cancel/cancel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/regress/lib/libc_r/cancel/cancel.c b/regress/lib/libc_r/cancel/cancel.c index 2dd0d4c1940..be344ba7731 100644 --- a/regress/lib/libc_r/cancel/cancel.c +++ b/regress/lib/libc_r/cancel/cancel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cancel.c,v 1.1 2001/08/15 14:37:10 fgsch Exp $ */ +/* $OpenBSD: cancel.c,v 1.2 2001/08/23 04:26:05 fgsch Exp $ */ /* David Leonard <d@openbsd.org>, 1999. Public Domain. */ #include <pthread.h> @@ -34,9 +34,9 @@ void v() { } void -c1handler(void *fd) +c1handler(void *arg) { - CHECKe(close((int)fd)); + CHECKe(close(*(int *)arg)); v(); } @@ -52,7 +52,7 @@ child1fn(arg) CHECKr(pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL)); /* something that will block */ CHECKe(fd = open("/dev/tty", O_RDONLY)); - pthread_cleanup_push(c1handler, (void *)fd); + pthread_cleanup_push(c1handler, (void *)&fd); v(); while (1) { CHECKe(len = read(fd, &buf, sizeof buf)); |