blob: a0351e82a6bf410ba351e24cb9a21e3ff418081f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
Index: libpthread/pthread/pt-setcancelstate.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/pthread/pt-setcancelstate.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-setcancelstate.c
--- libpthread/pthread/pt-setcancelstate.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/pthread/pt-setcancelstate.c 28 Apr 2009 17:51:08 -0000
@@ -35,7 +35,8 @@ pthread_setcancelstate (int state, int *
break;
}
- *oldstate = p->cancel_state;
+ if (oldstate)
+ *oldstate = p->cancel_state;
p->cancel_state = state;
return 0;
Index: libpthread/pthread/pt-setcanceltype.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libpthread/pthread/pt-setcanceltype.c,v
retrieving revision 1.1
diff -u -p -r1.1 pt-setcanceltype.c
--- libpthread/pthread/pt-setcanceltype.c 10 Oct 2002 23:05:06 -0000 1.1
+++ libpthread/pthread/pt-setcanceltype.c 28 Apr 2009 17:51:08 -0000
@@ -35,7 +35,8 @@ pthread_setcanceltype (int type, int *ol
break;
}
- *oldtype = p->cancel_type;
+ if (oldtype)
+ *oldtype = p->cancel_type;
p->cancel_type = type;
return 0;
|