diff --git a/libs/libc/syslog/lib_syslog.c b/libs/libc/syslog/lib_syslog.c index 8bbe16f2c0..311579c5b3 100644 --- a/libs/libc/syslog/lib_syslog.c +++ b/libs/libc/syslog/lib_syslog.c @@ -40,6 +40,7 @@ #include +#include #include #include @@ -110,3 +111,4 @@ void syslog(int priority, FAR const IPTR char *fmt, ...) vsyslog(priority, fmt, ap); va_end(ap); } + diff --git a/mm/mm_heap/mm_sem.c b/mm/mm_heap/mm_sem.c index 7391c0179b..f59018ef94 100644 --- a/mm/mm_heap/mm_sem.c +++ b/mm/mm_heap/mm_sem.c @@ -294,16 +294,12 @@ void mm_givesemaphore(FAR struct mm_heap_s *heap) #ifdef CONFIG_SMP irqstate_t flags = enter_critical_section(); #endif -#if defined(CONFIG_DEBUG_ASSERTIONS) || \ - (defined(MONITOR_MM_SEMAPHORE) && defined(CONFIG_DEBUG_INFO)) - pid_t my_pid = getpid(); -#endif /* The current task should be holding at least one reference to the * semaphore. */ - DEBUGASSERT(heap->mm_holder == my_pid); + DEBUGASSERT(heap->mm_holder == getpid()); /* Does the current task hold multiple references to the semaphore */ @@ -319,7 +315,7 @@ void mm_givesemaphore(FAR struct mm_heap_s *heap) { /* Nope, this is the last reference held by the current task. */ - mseminfo("PID=%d giving\n", my_pid); + mseminfo("PID=%d giving\n", getpid()); heap->mm_holder = NO_HOLDER; heap->mm_counts_held = 0;