From 5b97638ac7327dfde9b3c3198ac6a242935c13dc Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sat, 12 Oct 2024 09:22:11 +0100 Subject: [PATCH] port.c: MagAtof() constify and add prototype --- utils/port.c | 2 +- utils/utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/port.c b/utils/port.c index 1ce6c719..3f01386b 100644 --- a/utils/port.c +++ b/utils/port.c @@ -42,7 +42,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ float MagAtof(s) - char *s; + const char *s; { #ifdef linux float flt; diff --git a/utils/utils.h b/utils/utils.h index 7bc1e855..f48b849b 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -103,7 +103,7 @@ extern gzFile flock_zopen(); */ #define LAST_BIT_OF(x) ((x) & ~((x) - 1)) -extern float MagAtof(); +extern float MagAtof(const char *s); extern int Wait(int *status); extern int WaitPid(int pid, int *status);