diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-12-15 20:55:24 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-12-15 20:55:24 +0100 |
commit | 63dc88888692fbeddb4c0a2ec99af3cd708276eb (patch) | |
tree | 816e380c679b79f421419c89af154a234a6ee48a /src/z-util.c | |
parent | 87e166812794559b13741c70e1de5d3280a3ff17 (diff) |
Remove core() and core_aux
Invoking undefined behavior is not the correct way to
get a core dump. Plus there's only a single caller,
only used in truly bizarre circumstances.
Diffstat (limited to 'src/z-util.c')
-rw-r--r-- | src/z-util.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/z-util.c b/src/z-util.c index 4c59f793..0304a1da 100644 --- a/src/z-util.c +++ b/src/z-util.c @@ -106,35 +106,3 @@ void quit(cptr str) /* Failure */ (void)(exit( -1)); } - - - -/* - * Redefinable "core" action - */ -void (*core_aux)(cptr) = NULL; - -/* - * Dump a core file, after printing a warning message - * As with "quit()", try to use the "core_aux()" hook first. - */ -void core(cptr str) -{ - char *crash = NULL; - - /* Use the aux function */ - if (core_aux) (*core_aux)(str); - - /* Dump the warning string */ - if (str) plog(str); - - /* Attempt to Crash */ - (*crash) = (*crash); - - /* Be sure we exited */ - quit("core() failed"); -} - - - - |