From ad29f3a56e4db0c56e216cd0b4a0f1bdbcc47ff8 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sat, 1 Mar 2025 12:35:26 -0500 Subject: remove redundant printf modifiers --- test.h | 2 +- ui.c | 2 +- widget.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test.h b/test.h index ef3e9cf..150443c 100644 --- a/test.h +++ b/test.h @@ -2,7 +2,7 @@ #define test(got, want) { \ if (got < want-EPSILON || got > want+EPSILON) { \ - fprintf(stderr, "got %lf; want %lf\n", got, want); \ + fprintf(stderr, "got %f; want %f\n", got, want); \ assert(got == want); \ } \ } diff --git a/ui.c b/ui.c index 216a10b..cd9dddb 100644 --- a/ui.c +++ b/ui.c @@ -110,7 +110,7 @@ set_volume_flow_rate(UI *ui, int idx) { convert = volume_flow_rate_readers[unit_idx]; v = convert(volume_flow_rate(&ui->points[idx])); - snprintf(ui->volume_flow_rate[idx], sizeof(ui->volume_flow_rate[idx]), "%lf", v); + snprintf(ui->volume_flow_rate[idx], sizeof(ui->volume_flow_rate[idx]), "%f", v); } void diff --git a/widget.c b/widget.c index 46c7b07..5ff6f2f 100644 --- a/widget.c +++ b/widget.c @@ -35,7 +35,7 @@ w_field(mu_Context *ctx, w_Field *f) { void w_set_field(w_Field *f, double val) { f->value = val; - snprintf(f->buf, sizeof(f->buf), "%lf", val); + snprintf(f->buf, sizeof(f->buf), "%f", val); } void -- cgit v1.2.3