Skip to content

Commit

Permalink
common BUGFIX missing return check
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Jan 22, 2025
1 parent 95bae2d commit b674691
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,16 +1006,16 @@ np_op_export_url(const struct ly_ctx *ly_ctx, const char *url, struct lyd_node *
r = curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
}
if (!r) {
curl_easy_setopt(curl, CURLOPT_READFUNCTION, url_readdata);
r = curl_easy_setopt(curl, CURLOPT_READFUNCTION, url_readdata);
}
if (!r) {
curl_easy_setopt(curl, CURLOPT_READDATA, &mem_data);
r = curl_easy_setopt(curl, CURLOPT_READDATA, &mem_data);
}
if (!r) {
curl_easy_setopt(curl, CURLOPT_INFILESIZE, (long)mem_data.size);
r = curl_easy_setopt(curl, CURLOPT_INFILESIZE, (long)mem_data.size);
}
if (!r) {
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_buffer);
r = curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_buffer);
}
if (r) {
ERR("Failed to set a curl option.");
Expand Down

0 comments on commit b674691

Please sign in to comment.