Skip to content

Commit

Permalink
remove gvm_json_pull_event_reset() because duplicates gvm_json_pull_e…
Browse files Browse the repository at this point in the history
…vent_cleanup()
  • Loading branch information
jjnicola committed Oct 7, 2024
1 parent c6ad141 commit f4e048b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
16 changes: 1 addition & 15 deletions util/jsonpull.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,6 @@ gvm_json_pull_event_init (gvm_json_pull_event_t *event)
memset (event, 0, sizeof (gvm_json_pull_event_t));
}

/**
* @brief Resets a JSON pull event data structure for reuse.
*
* @param[in] event The event structure to reset
*/
void
gvm_json_pull_event_reset (gvm_json_pull_event_t *event)
{
cJSON_free (event->value);
if (event->error_message)
g_free (event->error_message);
memset (event, 0, sizeof (gvm_json_pull_event_t));
}

/**
* @brief Frees all data of JSON pull event data structure.
*
Expand Down Expand Up @@ -744,7 +730,7 @@ gvm_json_pull_parser_next (gvm_json_pull_parser_t *parser,
assert (parser);
assert (event);

gvm_json_pull_event_reset (event);
gvm_json_pull_event_cleanup (event);
if (parser->last_read_char == GVM_JSON_CHAR_UNDEFINED)
{
// Handle first read of the stream
Expand Down
3 changes: 0 additions & 3 deletions util/jsonpull.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ gvm_json_pull_path_elem_free (gvm_json_path_elem_t *);
void
gvm_json_pull_event_init (gvm_json_pull_event_t *);

void
gvm_json_pull_event_reset (gvm_json_pull_event_t *);

void
gvm_json_pull_event_cleanup (gvm_json_pull_event_t *);

Expand Down

0 comments on commit f4e048b

Please sign in to comment.