diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-08-22 15:29:14 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-08-23 11:47:57 +0200 |
commit | 32d64b2e875f0d74cd433dff8bda9f8a98dcd44e (patch) | |
tree | db6ada3797b657b4bb60fe408923d9dfa82cb84a /docs/examples | |
parent | 95507f1dc8c159c05b34f96f7a7baf4e8a9a4106 (diff) | |
download | curl-32d64b2e875f0d74cd433dff8bda9f8a98dcd44e.tar.gz |
defines: avoid underscore-prefixed defines
Double-underscored or underscore plus uppercase letter at least.
... as they're claimed to be reserved.
Reported-by: patnyb on github
Fixes #4254
Closes #4255
Diffstat (limited to 'docs/examples')
-rw-r--r-- | docs/examples/ephiperfifo.c | 16 | ||||
-rw-r--r-- | docs/examples/hiperfifo.c | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/docs/examples/ephiperfifo.c b/docs/examples/ephiperfifo.c index 657b61257..c076a8523 100644 --- a/docs/examples/ephiperfifo.c +++ b/docs/examples/ephiperfifo.c @@ -108,7 +108,7 @@ typedef struct _SockInfo GlobalInfo *global; } SockInfo; -#define __case(code) \ +#define mycase(code) \ case code: s = __STRING(code) /* Die if we get a bad CURLMcode somewhere */ @@ -117,14 +117,14 @@ static void mcode_or_die(const char *where, CURLMcode code) if(CURLM_OK != code) { const char *s; switch(code) { - __case(CURLM_BAD_HANDLE); break; - __case(CURLM_BAD_EASY_HANDLE); break; - __case(CURLM_OUT_OF_MEMORY); break; - __case(CURLM_INTERNAL_ERROR); break; - __case(CURLM_UNKNOWN_OPTION); break; - __case(CURLM_LAST); break; + mycase(CURLM_BAD_HANDLE); break; + mycase(CURLM_BAD_EASY_HANDLE); break; + mycase(CURLM_OUT_OF_MEMORY); break; + mycase(CURLM_INTERNAL_ERROR); break; + mycase(CURLM_UNKNOWN_OPTION); break; + mycase(CURLM_LAST); break; default: s = "CURLM_unknown"; break; - __case(CURLM_BAD_SOCKET); + mycase(CURLM_BAD_SOCKET); fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s); /* ignore this error */ return; diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c index 6f176365b..c02659b9a 100644 --- a/docs/examples/hiperfifo.c +++ b/docs/examples/hiperfifo.c @@ -109,7 +109,7 @@ typedef struct _SockInfo GlobalInfo *global; } SockInfo; -#define __case(code) \ +#define mycase(code) \ case code: s = __STRING(code) /* Die if we get a bad CURLMcode somewhere */ @@ -118,14 +118,14 @@ static void mcode_or_die(const char *where, CURLMcode code) if(CURLM_OK != code) { const char *s; switch(code) { - __case(CURLM_BAD_HANDLE); break; - __case(CURLM_BAD_EASY_HANDLE); break; - __case(CURLM_OUT_OF_MEMORY); break; - __case(CURLM_INTERNAL_ERROR); break; - __case(CURLM_UNKNOWN_OPTION); break; - __case(CURLM_LAST); break; + mycase(CURLM_BAD_HANDLE); break; + mycase(CURLM_BAD_EASY_HANDLE); break; + mycase(CURLM_OUT_OF_MEMORY); break; + mycase(CURLM_INTERNAL_ERROR); break; + mycase(CURLM_UNKNOWN_OPTION); break; + mycase(CURLM_LAST); break; default: s = "CURLM_unknown"; break; - __case(CURLM_BAD_SOCKET); + mycase(CURLM_BAD_SOCKET); fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s); /* ignore this error */ return; |