mirror of
https://github.com/CTCaer/switch-l4t-atf.git
synced 2024-12-02 23:56:35 +00:00
5ea2827734
Ensures compliance with MISRA C-2012 Rule 22.7 Change-Id: Ifbe0926a24ba0dca18174e1aa87313a63bba50fb Signed-off-by: Jonathan Wright <jonathan.wright@arm.com>
26 lines
420 B
C
26 lines
420 B
C
/*
|
|
* Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
int puts(const char *s)
|
|
{
|
|
int count = 0;
|
|
while(*s) {
|
|
if (putchar(*s++) == EOF)
|
|
return EOF;
|
|
count++;
|
|
}
|
|
|
|
/* According to the puts(3) manpage, the function should write a
|
|
* trailing newline.
|
|
*/
|
|
if (putchar('\n') == EOF)
|
|
return EOF;
|
|
|
|
return count + 1;
|
|
}
|