]> granicus.if.org Git - curl/commitdiff
typecheck-gcc: allow CURLOPT_STDERR to be NULL too
authorDaniel Stenberg <daniel@haxx.se>
Mon, 5 Jun 2017 12:56:13 +0000 (14:56 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 5 Jun 2017 12:56:26 +0000 (14:56 +0200)
include/curl/typecheck-gcc.h

index 0a08175f74aa7b0b86f9c310e693b76408e7e669..10b5de2ab12cc3f70885731594a7b6392a5b43c2 100644 (file)
@@ -470,8 +470,9 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_socket,
 #endif
 
 /* evaluates to true if expr is of type FILE* */
-#define _curl_is_FILE(expr)                                                   \
-  (__builtin_types_compatible_p(__typeof__(expr), FILE *))
+#define _curl_is_FILE(expr)                                             \
+  (_curl_is_NULL(expr) ||                                              \
+   (__builtin_types_compatible_p(__typeof__(expr), FILE *)))
 
 /* evaluates to true if expr can be passed as POST data (void* or char*) */
 #define _curl_is_postfields(expr)                                             \