From 37116d359eed0907655fea19f4a34b553df30e0a Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Sat, 19 Nov 2022 01:42:51 +0100 Subject: [PATCH] core: replace RIOT_FILE_RELATIVE with __FILE__ --- core/lib/include/assert.h | 7 +------ core/msg.c | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/core/lib/include/assert.h b/core/lib/include/assert.h index 1e328596df..0d3ed816fd 100644 --- a/core/lib/include/assert.h +++ b/core/lib/include/assert.h @@ -44,10 +44,6 @@ extern "C" { #define DEBUG_ASSERT_VERBOSE #endif -#ifndef RIOT_FILE_RELATIVE -#define RIOT_FILE_RELATIVE (__FILE__) -#endif - /** * @def __NORETURN * @brief hidden (__) NORETURN definition @@ -110,8 +106,7 @@ __NORETURN void _assert_failure(const char *file, unsigned line); * * @see http://pubs.opengroup.org/onlinepubs/9699919799/functions/assert.html */ -#define assert(cond) ((cond) ? (void)0 : _assert_failure(RIOT_FILE_RELATIVE, \ - __LINE__)) +#define assert(cond) ((cond) ? (void)0 : _assert_failure(__FILE__, __LINE__)) #else /* DEBUG_ASSERT_VERBOSE */ __NORETURN void _assert_panic(void); #define assert(cond) ((cond) ? (void)0 : _assert_panic()) diff --git a/core/msg.c b/core/msg.c index cc4b2e82b6..83f95e5c2f 100644 --- a/core/msg.c +++ b/core/msg.c @@ -105,18 +105,18 @@ static int _msg_send(msg_t *m, kernel_pid_t target_pid, bool block, thread_t *me = thread_get_active(); DEBUG("msg_send() %s:%i: Sending from %" PRIkernel_pid " to %" PRIkernel_pid - ". block=%i src->state=%i target->state=%i\n", RIOT_FILE_RELATIVE, + ". block=%i src->state=%i target->state=%i\n", __FILE__, __LINE__, thread_getpid(), target_pid, block, (int)me->status, (int)target->status); if (target->status != STATUS_RECEIVE_BLOCKED) { DEBUG( "msg_send() %s:%i: Target %" PRIkernel_pid " is not RECEIVE_BLOCKED.\n", - RIOT_FILE_RELATIVE, __LINE__, target_pid); + __FILE__, __LINE__, target_pid); if (queue_msg(target, m)) { DEBUG("msg_send() %s:%i: Target %" PRIkernel_pid - " has a msg_queue. Queueing message.\n", RIOT_FILE_RELATIVE, + " has a msg_queue. Queueing message.\n", __FILE__, __LINE__, target_pid); irq_restore(state); if (me->status == STATUS_REPLY_BLOCKED