1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 17:31:46 -05:00

curl: "Dereference of null pointer"

Rephrase to satisfy scan-build.
This commit is contained in:
Patrick Monnerat 2019-02-13 18:44:17 +01:00
parent 71786c0505
commit e916025f32

View File

@ -628,7 +628,7 @@ static int get_param_part(struct OperationConfig *config, char endchar,
} }
#define SET_TOOL_MIME_PTR(m, field, retcode) { \ #define SET_TOOL_MIME_PTR(m, field, retcode) { \
if(field) \ if(field) \
NULL_CHECK(m->field, strdup(field), retcode); \ NULL_CHECK((m)->field, strdup(field), retcode); \
} }
int formparse(struct OperationConfig *config, int formparse(struct OperationConfig *config,
@ -651,7 +651,7 @@ int formparse(struct OperationConfig *config,
CURLcode res; CURLcode res;
/* Allocate the main mime structure if needed. */ /* Allocate the main mime structure if needed. */
if(!*mimepost) { if(!*mimecurrent) {
NULL_CHECK(*mimepost, tool_mime_new_parts(NULL), 1); NULL_CHECK(*mimepost, tool_mime_new_parts(NULL), 1);
*mimecurrent = *mimepost; *mimecurrent = *mimepost;
} }