Commit 5133c29c authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Remove some excessive return lines in errors functions

parent 851322d1
......@@ -37,7 +37,6 @@ blc_dim *vcreate_blc_dims(size_t *size, uint32_t type, int dims_nb, int length,
dim->length=length;
length=va_arg(arguments, int);
}
return dims;
}
......
......@@ -60,7 +60,7 @@ void print_warning(const char *name_of_file, const char* name_of_function, int n
va_start(arguments, message);
color_eprintf(BLC_YELLOW, "\n%s: %s \t %s \t %i :\nWarning: ", blc_program_name, name_of_file, name_of_function, numero_of_line);
color_veprintf(BLC_YELLOW, message, arguments);
fprintf(stderr, "\n\n");
fprintf(stderr, "\n");
fflush(stderr);
va_end(arguments);
}
......@@ -72,7 +72,7 @@ void print_system_error(const char *name_of_file, const char* name_of_function,
va_start(arguments, message);
color_eprintf(BLC_BRIGHT_RED, "\n%s: %s \t %s \t %i :\nSystem error: %s\n", blc_program_name, name_of_file, name_of_function, numero_of_line, strerror(errno));
color_veprintf(BLC_BRIGHT_RED, message, arguments);
fprintf(stderr, "\n\n");
fprintf(stderr, "\n");
fflush(stderr);
va_end(arguments);
}
......@@ -82,10 +82,10 @@ void fatal_error(const char *name_of_file, const char* name_of_function, int num
{
va_list arguments;
va_start(arguments, message);
color_eprintf(BLC_BRIGHT_RED, "\n%s: %s \t %s \t %i :\nError: ", blc_program_name, name_of_file, name_of_function, numero_of_line);
color_eprintf(BLC_BRIGHT_RED, "%s: %s \t %s \t %i :\nError: ", blc_program_name, name_of_file, name_of_function, numero_of_line);
color_veprintf(BLC_BRIGHT_RED, message, arguments);
va_end(arguments);
fprintf(stderr, "\n\n");
fprintf(stderr, "\n");
fflush(stderr);
raise(SIGABRT);
exit(EXIT_FAILURE);
......@@ -115,7 +115,7 @@ void fatal_command_system_error(const char *name_of_file, const char* name_of_fu
color_eprintf(BLC_BRIGHT_RED, "System error: %s\n", strerror(errno));
color_veprintf(BLC_BRIGHT_RED, message, arguments);
va_end(arguments);
fprintf(stderr, "\n\n");
fprintf(stderr, "\n");
fflush(stderr);
raise(SIGABRT);
exit(EXIT_FAILURE);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment