summaryrefslogtreecommitdiff
path: root/lib/libc/puts.c
diff options
context:
space:
mode:
authorDimitris Papastamos <dimitris.papastamos@arm.com>2018-08-22 14:40:50 +0100
committerGitHub <noreply@github.com>2018-08-22 14:40:50 +0100
commit6d4f6aea2cd96a4a57ffa2d88b9230e2cab88f28 (patch)
tree251ed2d6ebe98576eaa9e1871f3aef753552125b /lib/libc/puts.c
parent11dfe0b49ac8fcb5d1b516a3f52b06bc433ff4d9 (diff)
parent8422a8406b7d2d8e01c113e24eca167854981dfe (diff)
Merge pull request #1528 from antonio-nino-diaz-arm/an/libc
libc: Cleanup library
Diffstat (limited to 'lib/libc/puts.c')
-rw-r--r--lib/libc/puts.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/puts.c b/lib/libc/puts.c
index 284cf8c5..717b5228 100644
--- a/lib/libc/puts.c
+++ b/lib/libc/puts.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -9,15 +9,13 @@
int puts(const char *s)
{
int count = 0;
- while(*s) {
+
+ 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;