[Libreoffice-commits] core.git: 2 commits - desktop/source
Tor Lillqvist
tml at collabora.com
Fri Feb 26 13:03:12 UTC 2016
desktop/source/minidump/minidump_upload.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 1be32cc6d36766d42a0b80d2768bf31e5b8aa8bb
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Feb 26 15:01:37 2016 +0200
loplugin:redundantcast
Change-Id: I8c44383a751d7b3440dcdede3646231414e2f89c
diff --git a/desktop/source/minidump/minidump_upload.cxx b/desktop/source/minidump/minidump_upload.cxx
index 3077d94..29814be 100644
--- a/desktop/source/minidump/minidump_upload.cxx
+++ b/desktop/source/minidump/minidump_upload.cxx
@@ -45,9 +45,9 @@ static size_t WriteCallback(void *ptr, size_t size,
if (!userp)
return 0;
- std::string* response = reinterpret_cast<std::string *>(userp);
+ std::string* response = static_cast<std::string *>(userp);
size_t real_size = size * nmemb;
- response->append(reinterpret_cast<char *>(ptr), real_size);
+ response->append(static_cast<char *>(ptr), real_size);
return real_size;
}
@@ -117,7 +117,7 @@ bool uploadContent(std::map<std::string, std::string>& parameters)
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA,
- reinterpret_cast<void *>(&response_body));
+ static_cast<void *>(&response_body));
// Fail if 400+ is returned from the web server.
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
commit 0eeeaae5d1edc0dbd0962666bdf9432e84cfa0e6
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Feb 26 14:51:22 2016 +0200
loplugin:nullptr
Change-Id: I11f661b31db8073010a520ccd44d93e1eb7c5bc0
diff --git a/desktop/source/minidump/minidump_upload.cxx b/desktop/source/minidump/minidump_upload.cxx
index 220286a..3077d94 100644
--- a/desktop/source/minidump/minidump_upload.cxx
+++ b/desktop/source/minidump/minidump_upload.cxx
@@ -111,7 +111,7 @@ bool uploadContent(std::map<std::string, std::string>& parameters)
// Disable 100-continue header.
char buf[] = "Expect:";
- curl_slist* headerlist = NULL;
+ curl_slist* headerlist = nullptr;
headerlist = curl_slist_append(headerlist, buf);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
@@ -132,15 +132,15 @@ bool uploadContent(std::map<std::string, std::string>& parameters)
#endif
/*
* TODO
- if (error_description != NULL)
+ if (error_description != nullptr)
*error_description = curl_easy_strerror(cc);
*/
- if (formpost != NULL)
+ if (formpost != nullptr)
{
curl_formfree(formpost);
}
- if (headerlist != NULL)
+ if (headerlist != nullptr)
{
curl_slist_free_all(headerlist);
}
More information about the Libreoffice-commits
mailing list