summaryrefslogtreecommitdiffstats
path: root/mount/xmalloc.c
diff options
context:
space:
mode:
authorKarel Zak2007-10-25 10:12:51 +0200
committerKarel Zak2007-10-25 21:50:59 +0200
commit26f95c7da28d94f663566e9d2132d4c71a1af098 (patch)
tree2bfcac3c931973d61080335b70f606f11cfe02e6 /mount/xmalloc.c
parentumount: use atexit() rather than (*at_die)() (diff)
downloadkernel-qcow2-util-linux-26f95c7da28d94f663566e9d2132d4c71a1af098.tar.gz
kernel-qcow2-util-linux-26f95c7da28d94f663566e9d2132d4c71a1af098.tar.xz
kernel-qcow2-util-linux-26f95c7da28d94f663566e9d2132d4c71a1af098.zip
mount: cleanup error() and die()
* moves error() and die() to sundries.h * removes at_die * adds __attribute__ ((__format__ (__printf__ ))) Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/xmalloc.c')
-rw-r--r--mount/xmalloc.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/mount/xmalloc.c b/mount/xmalloc.c
index c3f51e50c..3fd09fdd5 100644
--- a/mount/xmalloc.c
+++ b/mount/xmalloc.c
@@ -5,24 +5,6 @@
#include "nls.h" /* _() */
#include "sundries.h" /* EX_SYSERR */
-void (*at_die)(void) = NULL;
-
-/* Fatal error. Print message and exit. */
-void
-die(int err, const char *fmt, ...) {
- va_list args;
-
- va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- fprintf(stderr, "\n");
- va_end(args);
-
- if (at_die)
- (*at_die)();
-
- exit(err);
-}
-
static void
die_if_null(void *t) {
if (t == NULL)