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 <anas.nashif@intel.com>
This commit is contained in:
parent
4f52519c7e
commit
0576a3d0e6
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue