diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 12:11:21 +0200 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 12:11:21 +0200 |
| commit | 9de2a32ced4076497e26ebfcffbd8c3ec260699b (patch) | |
| tree | eb739cf07b7efc0cb81fb65622957f78e01d8111 /libpthread/pthread | |
| parent | 57ef58b1d62c28726f162a0a5cd3d2e7f7c92eed (diff) | |
| parent | 872345fd3c7bf57a6e6b87e35159b28ff290a965 (diff) | |
Merge tag 'upstream/20090701'
Diffstat (limited to 'libpthread/pthread')
| -rw-r--r-- | libpthread/pthread/pt-setcancelstate.c | 3 | ||||
| -rw-r--r-- | libpthread/pthread/pt-setcanceltype.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libpthread/pthread/pt-setcancelstate.c b/libpthread/pthread/pt-setcancelstate.c index ded58922..e2d81833 100644 --- a/libpthread/pthread/pt-setcancelstate.c +++ b/libpthread/pthread/pt-setcancelstate.c @@ -35,7 +35,8 @@ pthread_setcancelstate (int state, int *oldstate) break; } - *oldstate = p->cancel_state; + if (oldstate) + *oldstate = p->cancel_state; p->cancel_state = state; return 0; diff --git a/libpthread/pthread/pt-setcanceltype.c b/libpthread/pthread/pt-setcanceltype.c index 9511c991..3ce4259c 100644 --- a/libpthread/pthread/pt-setcanceltype.c +++ b/libpthread/pthread/pt-setcanceltype.c @@ -35,7 +35,8 @@ pthread_setcanceltype (int type, int *oldtype) break; } - *oldtype = p->cancel_type; + if (oldtype) + *oldtype = p->cancel_type; p->cancel_type = type; return 0; |
