From: Daniel Stenberg Date: Mon, 8 Sep 2014 08:11:34 +0000 (+0200) Subject: polarassl: avoid memset() when clearing the first byte is enough X-Git-Tag: curl-7_38_0~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=921a0c22a6f;p=thirdparty%2Fcurl.git polarassl: avoid memset() when clearing the first byte is enough --- diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c index f92b82e05e..5332b92ca7 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;