Skip to content

Commit 23ec0a1

Browse files
committed
fix: Line number on assertions
1 parent e836941 commit 23ec0a1

File tree

1 file changed

+3
-1
lines changed
  • demo/libbsp/platform/80x86/linux

1 file changed

+3
-1
lines changed

demo/libbsp/platform/80x86/linux/assert.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
/* --------------------------------- Notes --------------------------------- */
5252
/* ----------------------------- Include files ----------------------------- */
5353
#include <stdio.h>
54+
#include <stdlib.h>
5455

5556
#include "rkh.h"
5657

@@ -70,8 +71,9 @@ rkh_assert(RKHROM char * const file, int line)
7071
fprintf(stderr, "RKH_ASSERT: [%d] line from %s "
7172
"file\n", line, file);
7273
RKH_DIS_INTERRUPT();
73-
RKH_TR_FWK_ASSERT((RKHROM char *)file, __LINE__);
74+
RKH_TR_FWK_ASSERT((RKHROM char *)file, line);
7475
rkh_fwk_exit();
76+
exit(EXIT_FAILURE);
7577
}
7678

7779
/* ------------------------------ File footer ------------------------------ */

0 commit comments

Comments
 (0)