polarassl: avoid memset() when clearing the first byte is enough

This commit is contained in:
Daniel Stenberg 2014-09-08 10:11:34 +02:00
Родитель af45542cfe
Коммит 921a0c22a6
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -148,7 +148,7 @@ polarssl_connect_step1(struct connectdata *conn,
void *old_session = NULL; void *old_session = NULL;
size_t old_session_size = 0; size_t old_session_size = 0;
char errorbuf[128]; char errorbuf[128];
memset(errorbuf, 0, sizeof(errorbuf)); errorbuf[0]=0;
/* PolarSSL only supports SSLv3 and TLSv1 */ /* PolarSSL only supports SSLv3 and TLSv1 */
if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) { if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) {
@ -380,7 +380,7 @@ polarssl_connect_step2(struct connectdata *conn,
#endif #endif
char errorbuf[128]; char errorbuf[128];
memset(errorbuf, 0, sizeof(errorbuf)); errorbuf[0] = 0;
conn->recv[sockindex] = polarssl_recv; conn->recv[sockindex] = polarssl_recv;
conn->send[sockindex] = polarssl_send; conn->send[sockindex] = polarssl_send;