diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 12:10:06 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 12:10:06 +0200 |
commit | 872345fd3c7bf57a6e6b87e35159b28ff290a965 (patch) | |
tree | 94c7a422cdff0ab544cb3fbd400ca5e9b06542f1 /libpthread/pthread | |
parent | 15705185f4d3e60620a4747bf6ea9831402a2edd (diff) | |
parent | ae5f861010e23248573efa3addbcd3f115c7d9d4 (diff) |
Merge branch 'libpthread-moved' into upstream-merged
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; |