examples: fix more empty expression statement has no effect
Follow-up to 26e46617b9
This commit is contained in:
Родитель
a6d20b89db
Коммит
0a5b8af777
|
@ -163,7 +163,7 @@ int main(void)
|
||||||
* easy handles but *we* need to clean them up when they are done.
|
* easy handles but *we* need to clean them up when they are done.
|
||||||
*/
|
*/
|
||||||
do {
|
do {
|
||||||
int msgq = 0;;
|
int msgq = 0;
|
||||||
m = curl_multi_info_read(multi, &msgq);
|
m = curl_multi_info_read(multi, &msgq);
|
||||||
if(m && (m->msg == CURLMSG_DONE)) {
|
if(m && (m->msg == CURLMSG_DONE)) {
|
||||||
CURL *e = m->easy_handle;
|
CURL *e = m->easy_handle;
|
||||||
|
|
|
@ -315,7 +315,7 @@ int main(void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
do {
|
do {
|
||||||
int msgq = 0;;
|
int msgq = 0;
|
||||||
m = curl_multi_info_read(multi_handle, &msgq);
|
m = curl_multi_info_read(multi_handle, &msgq);
|
||||||
if(m && (m->msg == CURLMSG_DONE)) {
|
if(m && (m->msg == CURLMSG_DONE)) {
|
||||||
CURL *e = m->easy_handle;
|
CURL *e = m->easy_handle;
|
||||||
|
|
|
@ -61,17 +61,20 @@ static int _getch(void)
|
||||||
#define VERSION_STR "V1.0"
|
#define VERSION_STR "V1.0"
|
||||||
|
|
||||||
/* error handling macros */
|
/* error handling macros */
|
||||||
#define my_curl_easy_setopt(A, B, C) \
|
#define my_curl_easy_setopt(A, B, C) \
|
||||||
res = curl_easy_setopt((A), (B), (C)); \
|
do { \
|
||||||
if(res != CURLE_OK) \
|
res = curl_easy_setopt((A), (B), (C)); \
|
||||||
fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \
|
if(res != CURLE_OK) \
|
||||||
#A, #B, #C, res);
|
fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \
|
||||||
|
#A, #B, #C, res); \
|
||||||
#define my_curl_easy_perform(A) \
|
} while(0)
|
||||||
res = curl_easy_perform(A); \
|
|
||||||
if(res != CURLE_OK) \
|
|
||||||
fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res);
|
|
||||||
|
|
||||||
|
#define my_curl_easy_perform(A) \
|
||||||
|
do { \
|
||||||
|
res = curl_easy_perform(A); \
|
||||||
|
if(res != CURLE_OK) \
|
||||||
|
fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res); \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
/* send RTSP OPTIONS request */
|
/* send RTSP OPTIONS request */
|
||||||
static void rtsp_options(CURL *curl, const char *uri)
|
static void rtsp_options(CURL *curl, const char *uri)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче