mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 22:35:06 -05:00
Replace all CROAK calls with assert or LOG_FATAL
Remove croak() and use assert() or LOG_FATAL() everywhere. Hopefully the problems with debugging mentioned in the croak() comment are long gone.
This commit is contained in:
16
logging.c
16
logging.c
@@ -249,22 +249,6 @@ LOG_RateLimited(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
/* Force a core dump and exit without doing abort() or assert(0).
|
||||
These do funny things with the call stack in the core file that is
|
||||
generated, which makes diagnosis difficult. */
|
||||
|
||||
int
|
||||
croak(const char *file, int line, const char *msg)
|
||||
{
|
||||
int a;
|
||||
LOG(LOGS_ERR, LOGF_Util, "Unexpected condition [%s] at %s:%d, core dumped",
|
||||
msg, file, line);
|
||||
a = * (int *) 0;
|
||||
return a; /* Can't happen - this stops the optimiser optimising the
|
||||
line above */
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
LOG_FileID
|
||||
|
||||
Reference in New Issue
Block a user