libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 0ae9a4c10b2534f58b0e2aa0841fc837dfe5aa2a
parent 7999c2d7bfcc3cee873451ee31cd757fc0192d14
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sat,  6 Nov 2021 19:48:02 +0300

test_{tricky,toolarge}: minor improvement

Diffstat:
Msrc/testcurl/test_toolarge.c | 6+++---
Msrc/testcurl/test_tricky.c | 6+++---
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/testcurl/test_toolarge.c b/src/testcurl/test_toolarge.c @@ -455,6 +455,9 @@ ahcCheck (void *cls, struct ahc_cls_type *const param = (struct ahc_cls_type *) cls; size_t i; + if (NULL == param) + mhdErrorExitDesc ("cls parameter is NULL"); + if (0 != strcmp (version, MHD_HTTP_VERSION_1_1)) mhdErrorExitDesc ("Unexpected HTTP version"); @@ -470,9 +473,6 @@ ahcCheck (void *cls, if (0 != *upload_data_size) mhdErrorExitDesc ("'*upload_data_size' value is not zero"); - if (NULL == param) - mhdErrorExitDesc ("cls parameter is NULL"); - if (0 != strcmp (param->rq_method, method)) mhdErrorExitDesc ("Unexpected request method"); diff --git a/src/testcurl/test_tricky.c b/src/testcurl/test_tricky.c @@ -383,6 +383,9 @@ ahcCheck (void *cls, enum MHD_Result ret; struct ahc_cls_type *const param = (struct ahc_cls_type *) cls; + if (NULL == param) + mhdErrorExitDesc ("cls parameter is NULL"); + if (0 != strcmp (version, MHD_HTTP_VERSION_1_1)) mhdErrorExitDesc ("Unexpected HTTP version"); @@ -398,9 +401,6 @@ ahcCheck (void *cls, if (0 != *upload_data_size) mhdErrorExitDesc ("'*upload_data_size' value is not zero"); - if (NULL == param) - mhdErrorExitDesc ("cls parameter is NULL"); - if (0 != strcmp (param->rq_method, method)) mhdErrorExitDesc ("Unexpected request method");