Use EXIT_FAILURE symbolic name as return code.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Vit Rosin 2010-03-31 13:28:06 +04:00 committed by Andrew Borodin
parent 1c367a41fd
commit 993d678ed9
7 changed files with 16 additions and 16 deletions

View File

@ -1576,7 +1576,7 @@ get_key_code (int no_delay)
if (this == NULL) {
/* Shouldn't happen */
fputs ("Internal error\n", stderr);
exit (1);
exit (EXIT_FAILURE);
}
goto nodelay_try_again;
}

View File

@ -254,7 +254,7 @@ tty_init (gboolean slow, gboolean ugly_lines)
fprintf (stderr,
_("Screen size %dx%d is not supported.\n"
"Check the TERM environment variable.\n"), COLS, LINES);
exit (1);
exit (EXIT_FAILURE);
}
tcgetattr (fileno (stdin), &boot_mode);
@ -394,7 +394,7 @@ tty_lowlevel_getch (void)
fprintf (stderr,
"SLang_getkey returned SLANG_GETKEY_ERROR\n"
"Assuming EOF on stdin and exiting\n");
exit (1);
exit (EXIT_FAILURE);
}
return c;

View File

@ -1309,7 +1309,7 @@ register_port (int port, int abort_if_fail)
else {
fprintf (stderr, "Cannot register service with portmapper\n");
if (abort_if_fail)
exit (1);
exit (EXIT_FAILURE);
}
#else
(void) port;
@ -1403,5 +1403,5 @@ void
vfs_die (const char *m)
{
fputs (m, stderr);
exit (1);
exit (EXIT_FAILURE);
}

View File

@ -819,7 +819,7 @@ void
vfs_die (const char *m)
{
message (D_ERROR, _("Internal error:"), "%s", m);
exit (1);
exit (EXIT_FAILURE);
}
char *

View File

@ -1452,7 +1452,7 @@ init_xterm_support (void)
if (!termvalue || !(*termvalue))
{
fputs (_("The TERM environment variable is unset!\n"), stderr);
exit (1);
exit (EXIT_FAILURE);
}
/* Check mouse capabilities */
@ -2225,7 +2225,7 @@ mc_main__setup_by_args (int argc, char *argv[])
else
{
fputs ("No arguments given to the viewer\n", stderr);
exit (1);
exit (EXIT_FAILURE);
}
mc_run_mode = MC_RUN_VIEWER;
#ifdef USE_DIFF_VIEW
@ -2235,7 +2235,7 @@ mc_main__setup_by_args (int argc, char *argv[])
if (argc < 3)
{
fputs ("There 2 files are required to diffviewer\n", stderr);
exit (1);
exit (EXIT_FAILURE);
}
else if (tmp != NULL)
{

View File

@ -494,7 +494,7 @@ init_subshell (void)
fprintf (stderr, "Cannot spawn the subshell process: %s\r\n", unix_error_string (errno));
/* We exit here because, if the process table is full, the */
/* other method of running user commands won't work either */
exit (1);
exit (EXIT_FAILURE);
}
if (subshell_pid == 0)
@ -651,7 +651,7 @@ read_subshell_prompt (void)
else
{
fprintf (stderr, "select (FD_SETSIZE, &tmp...): %s\r\n", unix_error_string (errno));
exit (1);
exit (EXIT_FAILURE);
}
}
@ -1033,7 +1033,7 @@ feed_subshell (int how, int fail_on_error)
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
fprintf (stderr, "select (FD_SETSIZE, &read_set...): %s\r\n",
unix_error_string (errno));
exit (1);
exit (EXIT_FAILURE);
}
if (FD_ISSET (subshell_pty, &read_set))
@ -1054,7 +1054,7 @@ feed_subshell (int how, int fail_on_error)
{
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
fprintf (stderr, "read (subshell_pty...): %s\r\n", unix_error_string (errno));
exit (1);
exit (EXIT_FAILURE);
}
if (how == VISIBLY)
@ -1071,7 +1071,7 @@ feed_subshell (int how, int fail_on_error)
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
fprintf (stderr, "read (subshell_pipe[READ]...): %s\r\n",
unix_error_string (errno));
exit (1);
exit (EXIT_FAILURE);
}
subshell_cwd[bytes - 1] = 0; /* Squash the final '\n' */
@ -1095,7 +1095,7 @@ feed_subshell (int how, int fail_on_error)
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
fprintf (stderr,
"read (STDIN_FILENO, pty_buffer...): %s\r\n", unix_error_string (errno));
exit (1);
exit (EXIT_FAILURE);
}
for (i = 0; i < bytes; ++i)

View File

@ -1422,7 +1422,7 @@ input_destroy (WInput * in)
if (in == NULL)
{
fprintf (stderr, "Internal error: null Input *\n");
exit (1);
exit (EXIT_FAILURE);
}
new_input (in);