summaryrefslogtreecommitdiff
path: root/libpthread/pthread/pt-setcancelstate.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-08-01 01:06:13 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-08-01 01:06:13 +0200
commit8a42f9a3ff374eab8dec61b1d4eb8567a2a91ade (patch)
treeef4b3d43559f4f6455f70ef04fc853a05d3ff823 /libpthread/pthread/pt-setcancelstate.c
parent68567b88ee8f9e395e0c1f0a565affe8a1d4d68b (diff)
parent90dd2d73435a8e1bbcccf5ed99a91b2c438557f4 (diff)
Merge branch 'libpthread' into libpthread-moved
Diffstat (limited to 'libpthread/pthread/pt-setcancelstate.c')
-rw-r--r--libpthread/pthread/pt-setcancelstate.c3
1 files changed, 2 insertions, 1 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;