commit 9f173a7e240baa264bf6f3a67fcc43348ac8674a
parent 7f7febf3788d9fc8794e456555332e50123ed6bc
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 2 Sep 2021 14:14:39 +0200
a few errx(3) should be err(3)
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/simulation.c b/simulation.c
@@ -210,12 +210,12 @@ check_float(const char name[], const double value, int *return_status)
if (isnan(value)) {
ret = snprintf(message, sizeof(message), "%s is NaN", name);
if (ret < 0 || (size_t)ret >= sizeof(message))
- errx(1, "%s: message parsing", __func__);
+ err(1, "%s: message parsing", __func__);
warn_parameter_value(message, value, return_status);
} else if (isinf(value)) {
ret = snprintf(message, sizeof(message), "%s is infinite", name);
if (ret < 0 || (size_t)ret >= sizeof(message))
- errx(1, "%s: message parsing", __func__);
+ err(1, "%s: message parsing", __func__);
warn_parameter_value(message, value, return_status);
}
}
@@ -713,7 +713,7 @@ write_output_file(struct simulation *sim, const int normalize)
ret = snprintf(outfile, sizeof(outfile), "%s.output%05d.txt",
sim->name, sim->n_file++);
if (ret < 0 || (size_t)ret >= sizeof(outfile))
- errx(1, "%s: outfile snprintf", __func__);
+ err(1, "%s: outfile snprintf", __func__);
if ((fp = fopen(outfile, "w")) != NULL) {
print_output(sim, fp, normalize);