mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Correct error detection in echo(1).
This commit is contained in:
parent
efe70b3b3e
commit
cd1df6d088
1 changed files with 1 additions and 3 deletions
|
@ -38,9 +38,7 @@ int main(int argc, char* argv[])
|
|||
const char* prefix = "";
|
||||
for ( int i = startfrom; i < argc; i++ )
|
||||
{
|
||||
errno = 0;
|
||||
printf("%s%s", prefix, argv[i]);
|
||||
if ( errno != 0 )
|
||||
if ( printf("%s%s", prefix, argv[i]) < 0 )
|
||||
{
|
||||
perror("<stdout>");
|
||||
exit(1);
|
||||
|
|
Loading…
Add table
Reference in a new issue