Commit 21b41054 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

somewhat nicer libcurl usage

parent d7648d94
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -266,6 +266,8 @@ int main(int argc, char *argv[])
    exit(EXIT_FAILURE);
  }

  curl_global_init(CURL_GLOBAL_DEFAULT);

  // Initialize CURL connection

  if (!init(conn, argv[1]))
@@ -278,6 +280,8 @@ int main(int argc, char *argv[])
  // Retrieve content for the URL

  code = curl_easy_perform(conn);
  curl_easy_cleanup(conn);

  if (code != CURLE_OK)
  {
    fprintf(stderr, "Failed to get '%s' [%s]\n", argv[1], errorBuffer);