From 7e8c636b3084c6eb545bb8abfbefce5940d90178 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Wed, 24 Dec 2025 18:14:31 +0100 Subject: [PATCH] win32/sendmail.c: mark error messages array as const --- win32/sendmail.c | 4 ++-- win32/sendmail.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/sendmail.c b/win32/sendmail.c index 80dff3f3907..fbb2ae02989 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -63,7 +63,7 @@ char seps[] = " ,\t\n"; char *php_mailer = "PHP 7 WIN32"; /* Error messages */ -static char *ErrorMessages[] = +static const char *ErrorMessages[] = { "Success", /* 0 */ "Bad arguments from form", /* 1 */ @@ -328,7 +328,7 @@ PHPAPI void TSMClose(void) // Author/Date: jcar 20/9/96 // History: //********************************************************************* -PHPAPI char *GetSMErrorText(int index) +PHPAPI const char *GetSMErrorText(int index) { if (MIN_ERROR_INDEX <= index && index < MAX_ERROR_INDEX) { return (ErrorMessages[index]); diff --git a/win32/sendmail.h b/win32/sendmail.h index e6096f789eb..6cfdc5706f1 100644 --- a/win32/sendmail.h +++ b/win32/sendmail.h @@ -36,5 +36,5 @@ PHPAPI int TSendMail(const char *host, int *error, char **error_message, const char *headers, const char *Subject, const char *mailTo, const char *data, char *mailCc, char *mailBcc, char *mailRPath); PHPAPI void TSMClose(void); -PHPAPI char *GetSMErrorText(int index); +PHPAPI const char *GetSMErrorText(int index); #endif /* sendmail_h */