@@ -439,7 +439,7 @@ struct json_field
439439{
440440char * * scalar ;/* for all scalar types */
441441struct curl_slist * * array ;/* for type == JSON_TOKEN_ARRAY_START */
442- }target ;
442+ };
443443
444444bool required ;/* REQUIRED field, or just OPTIONAL? */
445445};
@@ -561,8 +561,8 @@ oauth_json_object_field_start(void *state, char *name, bool isnull)
561561{
562562field = ctx -> active ;
563563
564- if ((field -> type == JSON_TOKEN_ARRAY_START && * field -> target . array )
565- || (field -> type != JSON_TOKEN_ARRAY_START && * field -> target . scalar ))
564+ if ((field -> type == JSON_TOKEN_ARRAY_START && * field -> array )
565+ || (field -> type != JSON_TOKEN_ARRAY_START && * field -> scalar ))
566566{
567567oauth_parse_set_error (ctx , "field \"%s\" is duplicated" ,
568568 field -> name );
@@ -706,7 +706,7 @@ oauth_json_scalar(void *state, char *token, JsonTokenType type)
706706}
707707
708708/* ...and that a result has not already been set. */
709- if (* field -> target . scalar )
709+ if (* field -> scalar )
710710{
711711Assert (false);
712712oauth_parse_set_error (ctx ,
@@ -715,8 +715,8 @@ oauth_json_scalar(void *state, char *token, JsonTokenType type)
715715return JSON_SEM_ACTION_FAILED ;
716716}
717717
718- * field -> target . scalar = strdup (token );
719- if (!* field -> target . scalar )
718+ * field -> scalar = strdup (token );
719+ if (!* field -> scalar )
720720return JSON_OUT_OF_MEMORY ;
721721
722722ctx -> active = NULL ;
@@ -738,11 +738,11 @@ oauth_json_scalar(void *state, char *token, JsonTokenType type)
738738}
739739
740740/* Note that curl_slist_append() makes a copy of the token. */
741- temp = curl_slist_append (* field -> target . array , token );
741+ temp = curl_slist_append (* field -> array , token );
742742if (!temp )
743743return JSON_OUT_OF_MEMORY ;
744744
745- * field -> target . array = temp ;
745+ * field -> array = temp ;
746746}
747747}
748748else
@@ -878,8 +878,8 @@ parse_oauth_json(struct async_ctx *actx, const struct json_field *fields)
878878while (fields -> name )
879879{
880880if (fields -> required
881- && !* fields -> target . scalar
882- && !* fields -> target . array )
881+ && !* fields -> scalar
882+ && !* fields -> array )
883883{
884884actx_error (actx , "field \"%s\" is missing" , fields -> name );
885885goto cleanup ;
0 commit comments