Skip to content

Commit 81b0393

Browse files
committed
semihosting: Cleaned up the request handler function
1 parent a4bd7e5 commit 81b0393

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/target/semihosting.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ int32_t semihosting_request(target_s *const target, const uint32_t syscall, cons
687687
semihosting_s request = {r1, {}};
688688
if (syscall != SEMIHOSTING_SYS_EXIT)
689689
target_mem_read(target, request.params, r1, sizeof(request.params));
690-
int32_t ret = 0;
691690

692691
#if ENABLE_DEBUG == 1
693692
const char *syscall_descr = NULL;
@@ -776,8 +775,7 @@ int32_t semihosting_request(target_s *const target, const uint32_t syscall, cons
776775
// not implemented yet:
777776
case SEMIHOSTING_SYS_ELAPSED: /* elapsed */
778777
case SEMIHOSTING_SYS_TICKFREQ: /* tickfreq */
778+
default:
779779
return -1;
780780
}
781-
782-
return ret;
783781
}

0 commit comments

Comments
 (0)