yes.c: do not use exit after error

I think it would be better to exit through the error() and not
to call the exit() after the error().  This way we can get rid of
one function call (and curly brackets).

* src/yes.c (main): Exit through the error(), remove exit() call
after error().
This commit is contained in:
Marek Polacek authored and Eric Blake committed 2011-06-01 08:05:29 -06:00
1 parent e7b4bf4b57
commit cc8ee4d351
1 file changed
+1 -4
+1 -4
View File
@@ -84,9 +84,6 @@ main (int argc, char **argv)
for (i = optind; i < argc; i++)
if (fputs (argv[i], stdout) == EOF
|| putchar (i == argc - 1 ? '\n' : ' ') == EOF)
{
error (0, errno, _("standard output"));
exit (EXIT_FAILURE);
}
error (EXIT_FAILURE, errno, _("standard output"));
}
}