From 81b0393762f53b237f83cad8b8ab919e4e96700b Mon Sep 17 00:00:00 2001 From: dragonmux Date: Fri, 29 Dec 2023 02:18:54 +0000 Subject: [PATCH] semihosting: Cleaned up the request handler function --- src/target/semihosting.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/target/semihosting.c b/src/target/semihosting.c index a74b14faa07..74a6f53156a 100644 --- a/src/target/semihosting.c +++ b/src/target/semihosting.c @@ -687,7 +687,6 @@ int32_t semihosting_request(target_s *const target, const uint32_t syscall, cons semihosting_s request = {r1, {}}; if (syscall != SEMIHOSTING_SYS_EXIT) target_mem_read(target, request.params, r1, sizeof(request.params)); - int32_t ret = 0; #if ENABLE_DEBUG == 1 const char *syscall_descr = NULL; @@ -776,8 +775,7 @@ int32_t semihosting_request(target_s *const target, const uint32_t syscall, cons // not implemented yet: case SEMIHOSTING_SYS_ELAPSED: /* elapsed */ case SEMIHOSTING_SYS_TICKFREQ: /* tickfreq */ + default: return -1; } - - return ret; }