Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
2dc6760f3c1013796e4d05798aff824c85bc5265
/
.
/
src
/
stdio
/
gets.c
blob: 6c4645e5640b7b9d4df8387346a02122dfc0f5ea [
file
] [
log
] [
blame
]
#include
"stdio_impl.h"
#include
<limits.h>
#include
<string.h>
char
*
gets
(
char
*
s
)
{
char
*
ret
=
fgets
(
s
,
INT_MAX
,
stdin
);
if
(
ret
&&
s
[
strlen
(
s
)-
1
]
==
'\n'
)
s
[
strlen
(
s
)-
1
]
=
0
;
return
ret
;
}