Browse Source

Simplify Code.

PHP-5.1
Ilia Alshanetsky 22 years ago
parent
commit
1aab604198
  1. 6
      ext/imap/php_imap.c

6
ext/imap/php_imap.c

@ -3169,8 +3169,7 @@ PHP_FUNCTION(imap_mail_compose)
efree(tempstring); efree(tempstring);
} else { } else {
mystring = emalloc(strlen(tmp) + 1);
strcpy(mystring, tmp);
mystring = estrdup(tmp);
} }
bod = topbod; bod = topbod;
@ -3206,10 +3205,9 @@ PHP_FUNCTION(imap_mail_compose)
/* output cookie, mini-header, and contents */ /* output cookie, mini-header, and contents */
tempstring=emalloc(strlen(mystring)+strlen(tmp)+1); tempstring=emalloc(strlen(mystring)+strlen(tmp)+1);
strcpy(tempstring, mystring);
sprintf(tempstring, "%s%s", mystring, tmp);
efree(mystring); efree(mystring);
mystring=tempstring; mystring=tempstring;
strcat(mystring, tmp);
bod=&part->body; bod=&part->body;

Loading…
Cancel
Save