Commit 5a84ed33 authored by Andreas Schwab's avatar Andreas Schwab
Browse files

(fatal): Drop second parameter and treat first

parameter as a plain string.  Callers changed.
parent ccb06340
...@@ -175,10 +175,10 @@ error (s1, s2) ...@@ -175,10 +175,10 @@ error (s1, s2)
/* Print error message and exit. */ /* Print error message and exit. */
static void static void
fatal (s1, s2) fatal (s1)
char *s1, *s2; char *s1;
{ {
error (s1, s2); error ("%s", s1);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
...@@ -190,7 +190,7 @@ xmalloc (size) ...@@ -190,7 +190,7 @@ xmalloc (size)
{ {
long *result = (long *) malloc (((unsigned) size)); long *result = (long *) malloc (((unsigned) size));
if (result == ((long *) NULL)) if (result == ((long *) NULL))
fatal ("virtual memory exhausted", 0); fatal ("virtual memory exhausted");
return result; return result;
} }
...@@ -377,7 +377,7 @@ make_file_preface () ...@@ -377,7 +377,7 @@ make_file_preface ()
tm = localtime (&idiotic_interface); tm = localtime (&idiotic_interface);
if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year)
&& (the_date = asctime (tm)))) && (the_date = asctime (tm))))
fatal ("current time is out of range", 0); fatal ("current time is out of range");
/* the_date has an unwanted newline at the end */ /* the_date has an unwanted newline at the end */
date_length = strlen (the_date) - 1; date_length = strlen (the_date) - 1;
the_date[date_length] = '\0'; the_date[date_length] = '\0';
......
Markdown is supported
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