From 0576a3d0e67669e4ea6b6109906732d33f57b932 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Sat, 27 Mar 2021 10:16:56 -0400 Subject: [PATCH] libc: fputs/puts: match implementation to declaration The identifiers used in the declaration and definition of a function shall be identical [MISRAC2012-RULE_8_3-b] Signed-off-by: Anas Nashif --- lib/libc/minimal/source/stdout/stdout_console.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/libc/minimal/source/stdout/stdout_console.c b/lib/libc/minimal/source/stdout/stdout_console.c index 80460acf431..92f094c7877 100644 --- a/lib/libc/minimal/source/stdout/stdout_console.c +++ b/lib/libc/minimal/source/stdout/stdout_console.c @@ -43,12 +43,12 @@ int fputc(int c, FILE *stream) return zephyr_fputc(c, stream); } -int fputs(const char *_MLIBC_RESTRICT string, FILE *_MLIBC_RESTRICT stream) +int fputs(const char *_MLIBC_RESTRICT s, FILE *_MLIBC_RESTRICT stream) { - int len = strlen(string); + int len = strlen(s); int ret; - ret = fwrite(string, 1, len, stream); + ret = fwrite(s, 1, len, stream); return len == ret ? 0 : EOF; } @@ -103,9 +103,9 @@ size_t fwrite(const void *_MLIBC_RESTRICT ptr, size_t size, size_t nitems, } -int puts(const char *string) +int puts(const char *s) { - if (fputs(string, stdout) == EOF) { + if (fputs(s, stdout) == EOF) { return EOF; }