summaryrefslogtreecommitdiff
path: root/lib/vtls/polarssl.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-09-08 10:11:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-09-08 10:11:34 +0200
commit921a0c22a6fbf3cc7475bf3f833c0674688a8aaf (patch)
tree8c31df60e98903b884665f77b3caeccd314cd7ba /lib/vtls/polarssl.c
parentaf45542cfe2a5300b67079eea976e01eec48345e (diff)
downloadcurl-921a0c22a6fbf3cc7475bf3f833c0674688a8aaf.tar.gz
polarassl: avoid memset() when clearing the first byte is enough
Diffstat (limited to 'lib/vtls/polarssl.c')
-rw-r--r--lib/vtls/polarssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
index f92b82e05..5332b92ca 100644
--- a/lib/vtls/polarssl.c
+++ b/lib/vtls/polarssl.c
@@ -148,7 +148,7 @@ polarssl_connect_step1(struct connectdata *conn,
void *old_session = NULL;
size_t old_session_size = 0;
char errorbuf[128];
- memset(errorbuf, 0, sizeof(errorbuf));
+ errorbuf[0]=0;
/* PolarSSL only supports SSLv3 and TLSv1 */
if(data->set.ssl.version == CURL_SSLVERSION_SSLv2) {
@@ -380,7 +380,7 @@ polarssl_connect_step2(struct connectdata *conn,
#endif
char errorbuf[128];
- memset(errorbuf, 0, sizeof(errorbuf));
+ errorbuf[0] = 0;
conn->recv[sockindex] = polarssl_recv;
conn->send[sockindex] = polarssl_send;