From: Jim Meyering Date: Sat, 11 Nov 1995 14:35:27 +0000 (+0000) Subject: (cleanup): Add signal number parameter. X-Git-Tag: TEXTUTILS-1_13F~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b1382a3a9ace9d1fcc8a39a776a499ffefe010e;p=thirdparty%2Fcoreutils.git (cleanup): Add signal number parameter. Update callers. --- diff --git a/src/tac.c b/src/tac.c index ab7756d997..99e461b3f2 100644 --- a/src/tac.c +++ b/src/tac.c @@ -146,7 +146,7 @@ With no FILE, or when FILE is -, read standard input.\n\ } static RETSIGTYPE -cleanup (void) +cleanup (int signum) { unlink (tempfile); exit (1); @@ -163,7 +163,7 @@ xmalloc (unsigned int n) if (p == 0) { error (0, 0, _("virtual memory exhausted")); - cleanup (); + cleanup (0); } return p; } @@ -177,7 +177,7 @@ xrealloc (char *p, unsigned int n) if (p == 0) { error (0, 0, _("virtual memory exhausted")); - cleanup (); + cleanup (0); } return p; } @@ -188,7 +188,7 @@ xwrite (int desc, const char *buffer, int size) if (full_write (desc, buffer, size) < 0) { error (0, errno, _("write error")); - cleanup (); + cleanup (0); } } @@ -295,7 +295,7 @@ tac (int fd, const char *file) else if (ret == -2) { error (0, 0, _("error in regular expression search")); - cleanup (); + cleanup (0); } else { @@ -439,23 +439,23 @@ save_stdin (void) if (fd == -1) { error (0, errno, "%s", tempfile); - cleanup (); + cleanup (0); } while ((bytes_read = safe_read (0, buffer, read_size)) > 0) if (full_write (fd, buffer, bytes_read) < 0) { error (0, errno, "%s", tempfile); - cleanup (); + cleanup (0); } if (close (fd) < 0) { error (0, errno, "%s", tempfile); - cleanup (); + cleanup (0); } if (bytes_read == -1) { error (0, errno, _("read error")); - cleanup (); + cleanup (0); } }