checks if arg is NULL in SCHED_KILL
This commit is contained in:
parent
19daf5ad0b
commit
43c152a498
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: schedule.h,v 1.4 2006/09/09 16:22:10 manu Exp $ */
|
||||
/* $NetBSD: schedule.h,v 1.5 2007/03/21 14:28:59 vanhu Exp $ */
|
||||
|
||||
/* Id: schedule.h,v 1.5 2006/05/03 21:53:42 vanhu Exp */
|
||||
|
||||
@ -59,8 +59,10 @@ struct sched {
|
||||
/* cancel schedule */
|
||||
#define SCHED_KILL(s) \
|
||||
do { \
|
||||
sched_kill(s); \
|
||||
s = NULL; \
|
||||
if(s != NULL){ \
|
||||
sched_kill(s); \
|
||||
s = NULL; \
|
||||
}\
|
||||
} while(0)
|
||||
|
||||
/* must be called after it's called from scheduler. */
|
||||
|
Loading…
Reference in New Issue
Block a user