From d2dd6e06293d78d00a72ce45eb3bf2d492624cb1 Mon Sep 17 00:00:00 2001 From: fangting Date: Mon, 31 Jul 2023 10:19:08 +0800 Subject: [PATCH] =?UTF-8?q?codecheck=E9=97=AE=E9=A2=98=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: I7ONK3 Signed-off-by: fangting --- libc-test/src/functional/exit_constructor.c | 12 +++++++----- porting/linux/user/src/string/strcspn.c | 5 +++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libc-test/src/functional/exit_constructor.c b/libc-test/src/functional/exit_constructor.c index 5fedfa32..336a9d06 100644 --- a/libc-test/src/functional/exit_constructor.c +++ b/libc-test/src/functional/exit_constructor.c @@ -1,11 +1,13 @@ #include #include "test.h" -__attribute__((constructor)) -void B_ctor() { - exit(t_status); +__attribute__((constructor)) +void Ctor() +{ + exit(t_status); } -int main() { - return t_status; +int main() +{ + return t_status; } \ No newline at end of file diff --git a/porting/linux/user/src/string/strcspn.c b/porting/linux/user/src/string/strcspn.c index 30d23299..9065c30d 100644 --- a/porting/linux/user/src/string/strcspn.c +++ b/porting/linux/user/src/string/strcspn.c @@ -1,4 +1,4 @@ -// from openbsd, will be rectified later +// from openbsd, will be rectified later #include @@ -11,8 +11,9 @@ size_t strcspn(const char *string1, const char *string2) sc = *a++; p = string2; do { - if ((c = *p++) == sc) + if ((c = *p++) == sc) { return (a - 1 - string1); + } } while (c != 0); } /* NOTREACHED */ -- GitLab