Fixed NULL usage on non-pointer member in thread

per @theotherjimmy
pull/1785/head
geky 2016-05-26 16:24:32 -05:00
parent 1ab7d73805
commit 57bc433986
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ namespace rtos {
Thread::Thread(osPriority priority, Thread::Thread(osPriority priority,
uint32_t stack_size, unsigned char *stack_pointer): uint32_t stack_size, unsigned char *stack_pointer):
_tid(NULL), _dynamic_stack(stack_pointer == NULL) { _tid(0), _dynamic_stack(stack_pointer == NULL) {
#if defined(__MBED_CMSIS_RTOS_CA9) || defined(__MBED_CMSIS_RTOS_CM) #if defined(__MBED_CMSIS_RTOS_CA9) || defined(__MBED_CMSIS_RTOS_CM)
_thread_def.tpriority = priority; _thread_def.tpriority = priority;
_thread_def.stacksize = stack_size; _thread_def.stacksize = stack_size;
@ -44,7 +44,7 @@ Thread::Thread(osPriority priority,
Thread::Thread(void (*task)(void const *argument), void *argument, Thread::Thread(void (*task)(void const *argument), void *argument,
osPriority priority, uint32_t stack_size, unsigned char *stack_pointer): osPriority priority, uint32_t stack_size, unsigned char *stack_pointer):
_tid(NULL), _dynamic_stack(stack_pointer == NULL) { _tid(0), _dynamic_stack(stack_pointer == NULL) {
#if defined(__MBED_CMSIS_RTOS_CA9) || defined(__MBED_CMSIS_RTOS_CM) #if defined(__MBED_CMSIS_RTOS_CA9) || defined(__MBED_CMSIS_RTOS_CM)
_thread_def.tpriority = priority; _thread_def.tpriority = priority;
_thread_def.stacksize = stack_size; _thread_def.stacksize = stack_size;