mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibC: fputs() shouldn't add a trailing newline, only puts().
This commit is contained in:
parent
1ee8597ce4
commit
1483af406f
Notes:
sideshowbarker
2024-07-19 15:58:01 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1483af406f9
1 changed files with 5 additions and 2 deletions
|
@ -164,12 +164,15 @@ int fputs(const char* s, FILE* stream)
|
|||
if (rc == EOF)
|
||||
return EOF;
|
||||
}
|
||||
return putc('\n', stream);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int puts(const char* s)
|
||||
{
|
||||
return fputs(s, stdout);
|
||||
int rc = fputs(s, stdout);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
return fputc('\n', stdout);
|
||||
}
|
||||
|
||||
void clearerr(FILE* stream)
|
||||
|
|
Loading…
Reference in a new issue