From fb387ca83a1194874d77c0e032a874b8603d1591 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 5 Sep 2022 14:23:10 +0200 Subject: [PATCH 1/2] sys/syscalls: drop outdated comment on _sbrk_r() --- sys/newlib_syscalls_default/syscalls.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/newlib_syscalls_default/syscalls.c b/sys/newlib_syscalls_default/syscalls.c index ab692e831d..d42b2e301b 100644 --- a/sys/newlib_syscalls_default/syscalls.c +++ b/sys/newlib_syscalls_default/syscalls.c @@ -181,9 +181,6 @@ __attribute__((used)) void _exit(int n) /** * @brief Allocate memory from the heap. * - * The current heap implementation is very rudimentary, it is only able to allocate - * memory. But it does not have any means to free memory again - * * @return pointer to the newly allocated memory on success * @return pointer set to address `-1` on failure */ From d635004a625deefbd5252d12b90f5bcf37d8cdc3 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 5 Sep 2022 14:56:15 +0200 Subject: [PATCH 2/2] sys/syscalls: fix coding style --- sys/newlib_syscalls_default/syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/newlib_syscalls_default/syscalls.c b/sys/newlib_syscalls_default/syscalls.c index d42b2e301b..bed8d9ac99 100644 --- a/sys/newlib_syscalls_default/syscalls.c +++ b/sys/newlib_syscalls_default/syscalls.c @@ -175,7 +175,7 @@ __attribute__((used)) void _exit(int n) { LOG_INFO("#! exit %i: powering off\n", n); pm_off(); - while(1); + while (1) {} } /** @@ -603,7 +603,7 @@ int _isatty_r(struct _reent *r, int fd) { r->_errno = 0; - if(fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO) { + if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO) { return 1; }