All of lore.kernel.org
 help / color / mirror / Atom feed
* block/curl: should we be checking curl_easy_setopt() for errors?
@ 2021-08-30 15:34 Peter Maydell
  2021-08-31  8:44 ` Daniel P. Berrangé
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2021-08-30 15:34 UTC (permalink / raw)
  To: QEMU Developers, Qemu-block

Coverity complains (CID 1460331, 1459482, 1459336, 1458895)
that we call curl_easy_setopt(), which can return an error value,
but we never check the return value.

Is it correct? Looking at the libcurl documentation, the function
does return an error status, and there's nothing that says it's
ok to ignore (e.g. that it's guaranteed that the library will
safely accumulate any errors and return them when you make the
subsequent curl_easy_perform() call). On the other hand, neither
the libcurl manpage example nor the handful of example programs
at https://curl.se/libcurl/c/example.html ever seem to check the
return value from curl_easy_setopt()...

thanks
-- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-31  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-30 15:34 block/curl: should we be checking curl_easy_setopt() for errors? Peter Maydell
2021-08-31  8:44 ` Daniel P. Berrangé
2021-08-31  9:56   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.