]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
examples/rtsp: fix error handling macros
authorMattias Fornander <mfornander@nvidia.com>
Wed, 20 Dec 2017 18:48:26 +0000 (11:48 -0700)
committerJay Satiro <raysatiro@yahoo.com>
Fri, 22 Dec 2017 07:59:08 +0000 (02:59 -0500)
Closes https://github.com/curl/curl/pull/2185

docs/examples/rtsp.c

index 3035e3fbc0f462f33aa1f7b52b991c9c8475a2a6..32084e9ef397c6331d138f74092f38b56011d0f9 100644 (file)
@@ -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);