summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2017-07-25 06:51:44 +0100
committerJoe Watkins <krakjoe@php.net>2017-07-25 06:51:44 +0100
commit78ad5e8864feec55e3aecfd96b369a62ffb953ee (patch)
treee1382a1692befb9d5604616172f6c949bd21cd3c /win32
parentdbc2ffba822d13e74e37f5ba6e106f163c1008e8 (diff)
parent69b48f83dfc287a8430cf8e993d0937c5128623f (diff)
downloadphp-git-78ad5e8864feec55e3aecfd96b369a62ffb953ee.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: minor loop optimizations, closes #2633
Diffstat (limited to 'win32')
-rw-r--r--win32/sendmail.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/win32/sendmail.c b/win32/sendmail.c
index d83663a475..808fc8f5fd 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -698,10 +698,15 @@ static int PostHeader(char *RPath, char *Subject, char *mailTo, char *xheaders)
size_t i;
if (xheaders) {
+ size_t headers_lc_len;
+
if (NULL == (headers_lc = estrdup(xheaders))) {
return OUT_OF_MEMORY;
}
- for (i = 0; i < strlen(headers_lc); i++) {
+
+ headers_lc_len = strlen(headers_lc);
+
+ for (i = 0; i < headers_lc_len; i++) {
headers_lc[i] = tolower(headers_lc[i]);
}
}