From b437557896abf2d164e5cf9606dc4e9c4fa6cd92 Mon Sep 17 00:00:00 2001 From: Mattias Fornander Date: Wed, 20 Dec 2017 11:48:26 -0700 Subject: examples/rtsp: fix error handling macros Closes https://github.com/curl/curl/pull/2185 --- docs/examples/rtsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/examples/rtsp.c b/docs/examples/rtsp.c index 3035e3fbc..32084e9ef 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); -- cgit v1.2.1