Skip to content

Commit 57bc433

Browse files
committed
Fixed NULL usage on non-pointer member in thread
per @theotherjimmy
1 parent 1ab7d73 commit 57bc433

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rtos/rtos/Thread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace rtos {
3434

3535
Thread::Thread(osPriority priority,
3636
uint32_t stack_size, unsigned char *stack_pointer):
37-
_tid(NULL), _dynamic_stack(stack_pointer == NULL) {
37+
_tid(0), _dynamic_stack(stack_pointer == NULL) {
3838
#if defined(__MBED_CMSIS_RTOS_CA9) || defined(__MBED_CMSIS_RTOS_CM)
3939
_thread_def.tpriority = priority;
4040
_thread_def.stacksize = stack_size;
@@ -44,7 +44,7 @@ Thread::Thread(osPriority priority,
4444

4545
Thread::Thread(void (*task)(void const *argument), void *argument,
4646
osPriority priority, uint32_t stack_size, unsigned char *stack_pointer):
47-
_tid(NULL), _dynamic_stack(stack_pointer == NULL) {
47+
_tid(0), _dynamic_stack(stack_pointer == NULL) {
4848
#if defined(__MBED_CMSIS_RTOS_CA9) || defined(__MBED_CMSIS_RTOS_CM)
4949
_thread_def.tpriority = priority;
5050
_thread_def.stacksize = stack_size;

0 commit comments

Comments
 (0)