1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

win32/sendmail.c: mark error messages array as const

This commit is contained in:
Gina Peter Banyard
2025-12-24 18:14:31 +01:00
parent 69166c38ec
commit 7e8c636b30
2 changed files with 3 additions and 3 deletions

View File

@@ -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]);

View File

@@ -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 */