From ac1112ae4de6f5f520054b5608d202a57c296ac4 Mon Sep 17 00:00:00 2001 From: Federico Stazi Date: Fri, 7 Aug 2020 14:49:47 +0000 Subject: [PATCH] Minor fix --- oss-internship-2020/curl/examples/example1.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/oss-internship-2020/curl/examples/example1.cc b/oss-internship-2020/curl/examples/example1.cc index 5087647..465feac 100644 --- a/oss-internship-2020/curl/examples/example1.cc +++ b/oss-internship-2020/curl/examples/example1.cc @@ -44,16 +44,15 @@ int main(int argc, char* argv[]) { assert(status_or_curl.ok()); sapi::v::RemotePtr curl(status_or_curl.value()); - assert(curl.GetValue()); // Checking curl != NULL + assert(curl.GetValue()); // Checking curl != nullptr sapi::v::ConstCStr url("http://example.com"); - status_or_int = + sapi::StatusOr status_or_int = api.curl_easy_setopt_ptr(&curl, CURLOPT_URL, url.PtrBefore()); assert(status_or_int.ok()); assert(status_or_int.value() == CURLE_OK); - sapi::StatusOr status_or_int = - api.curl_easy_setopt_long(&curl, CURLOPT_FOLLOWLOCATION, 1l); + status_or_int = api.curl_easy_setopt_long(&curl, CURLOPT_FOLLOWLOCATION, 1l); assert(status_or_int.ok()); assert(status_or_int.value() == CURLE_OK);