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:
@@ -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]);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user