Skip to content

Commit 7e8c636

Browse files
committed
win32/sendmail.c: mark error messages array as const
1 parent 69166c3 commit 7e8c636

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

win32/sendmail.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ char seps[] = " ,\t\n";
6363
char *php_mailer = "PHP 7 WIN32";
6464

6565
/* Error messages */
66-
static char *ErrorMessages[] =
66+
static const char *ErrorMessages[] =
6767
{
6868
"Success", /* 0 */
6969
"Bad arguments from form", /* 1 */
@@ -328,7 +328,7 @@ PHPAPI void TSMClose(void)
328328
// Author/Date: jcar 20/9/96
329329
// History:
330330
//*********************************************************************
331-
PHPAPI char *GetSMErrorText(int index)
331+
PHPAPI const char *GetSMErrorText(int index)
332332
{
333333
if (MIN_ERROR_INDEX <= index && index < MAX_ERROR_INDEX) {
334334
return (ErrorMessages[index]);

win32/sendmail.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ PHPAPI int TSendMail(const char *host, int *error, char **error_message,
3636
const char *headers, const char *Subject, const char *mailTo, const char *data,
3737
char *mailCc, char *mailBcc, char *mailRPath);
3838
PHPAPI void TSMClose(void);
39-
PHPAPI char *GetSMErrorText(int index);
39+
PHPAPI const char *GetSMErrorText(int index);
4040
#endif /* sendmail_h */

0 commit comments

Comments
 (0)