From: Mattias Fornander Date: Wed, 20 Dec 2017 18:48:26 +0000 (-0700) Subject: examples/rtsp: fix error handling macros X-Git-Tag: curl-7_58_0~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b437557896abf2d164e5cf9606dc4e9c4fa6cd92;p=thirdparty%2Fcurl.git examples/rtsp: fix error handling macros Closes https://github.com/curl/curl/pull/2185 --- diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c index 3035e3fbc0..32084e9ef3 100644 --- a/docs/examples/rtsp.c +++ b/docs/examples/rtsp.c @@ -63,13 +63,13 @@ static int _getch(void) /* error handling macros */ #define my_curl_easy_setopt(A, B, C) \ res = curl_easy_setopt((A), (B), (C)); \ - if(!res) \ + if(res != CURLE_OK) \ fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \ #A, #B, #C, res); #define my_curl_easy_perform(A) \ res = curl_easy_perform(A); \ - if(!res) \ + if(res != CURLE_OK) \ fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res);