No need for memset to clear a byte.
authorRobin Gareus <robin@gareus.org>
Thu, 23 Nov 2017 09:10:32 +0000 (10:10 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 23 Nov 2017 09:10:32 +0000 (10:10 +0100)
gtk2_ardour/ardour_http.cc

index 23edbc62e8170b0fb54581d850515c05331d2220..320e1f81278cffa9f54265729473a05430301e8f 100644 (file)
@@ -139,7 +139,7 @@ HttpGet::HttpGet (bool p, bool ssl)
        , _status (-1)
        , _result (-1)
 {
-       memset (error_buffer, 0, sizeof (*error_buffer));
+       error_buffer[0] = 0;
        _curl = curl_easy_init ();
 
        if (!_curl) {
@@ -205,7 +205,7 @@ HttpGet::get (const char* url)
                free (mem.data);
        } // otherwise caller is expected to have free()d or re-used it.
 
-       memset (error_buffer, 0, sizeof (*error_buffer));
+       error_buffer[0] = 0;
        mem.data = NULL;
        mem.size = 0;