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:
Miroslav Lichvar
2010-08-12 14:30:05 +02:00
parent 2a64b75893
commit 6b0198c2d7
13 changed files with 105 additions and 195 deletions

View File

@@ -1210,7 +1210,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
break;
default:
CROAK("Impossible");
assert(0);
break;
}
@@ -1224,7 +1224,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
break;
default:
CROAK("Impossible");
assert(0);
break;
}
@@ -1786,7 +1786,7 @@ NCR_InitiateSampleBurst(NCR_Instance inst, int n_good_samples, int n_total_sampl
default:
CROAK("Impossible");
assert(0);
break;
}
}
@@ -1808,7 +1808,7 @@ NCR_ReportSource(NCR_Instance inst, RPT_SourceReport *report, struct timeval *no
report->mode = RPT_NTP_PEER;
break;
default:
CROAK("Impossible");
assert(0);
}
return;
@@ -1872,7 +1872,7 @@ NCR_IncrementActivityCounters(NCR_Instance inst, int *online, int *offline,
++*offline;
break;
default:
CROAK("Impossible");
assert(0);
break;
}
}