From a8c233975bb1c11ed18f77e2b0e84b24f1040a35 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 28 May 2024 20:31:17 +0200 Subject: [PATCH] don't truncate reason when initializing this makes -v output much more readable too! Thanks -Werror=stringop-truncation --- src/hdapsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hdapsd.c b/src/hdapsd.c index d962d20..291dc4a 100644 --- a/src/hdapsd.c +++ b/src/hdapsd.c @@ -544,7 +544,7 @@ int analyze (int x, int y, double unow, double base_threshold, threshold *= PARKED_THRESH_FACTOR; /* Threshold test (uses Pythagoras's theorem) */ - strncpy(reason, " ", 3); + strncpy(reason, " ", 4); check_thresh(veloc_sqr, threshold*VELOC_ADJUST, &above, &near, reason+0, 'V');