Skip to content

Commit

Permalink
Merge pull request #2302 from greenbone/clean-align
Browse files Browse the repository at this point in the history
Adjust alignment
  • Loading branch information
a-h-abdelsalam authored Jan 6, 2025
2 parents 25dff86 + dc12806 commit 884d6fc
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/manage_sql_secinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -3794,8 +3794,8 @@ update_cve_json (const gchar *cve_path, GHashTable *hashed_cpes)
{
gvm_json_pull_parser_next (&parser, &event);
gvm_json_path_elem_t *path_tail = g_queue_peek_tail (event.path);
if (event.type == GVM_JSON_PULL_EVENT_ARRAY_START && path_tail &&
path_tail->key && strcmp (path_tail->key, "vulnerabilities") == 0)
if (event.type == GVM_JSON_PULL_EVENT_ARRAY_START && path_tail
&& path_tail->key && strcmp (path_tail->key, "vulnerabilities") == 0)
{
cve_items_found = TRUE;
}
Expand Down Expand Up @@ -4499,7 +4499,7 @@ update_epss_scores ()
__func__, strerror (errno));
ret = -1;
}
g_free (current_json_path);
g_free (current_json_path);
return ret;
}

Expand Down Expand Up @@ -4528,8 +4528,8 @@ update_epss_scores ()
while (!epss_scores_found)
{
gvm_json_pull_parser_next (&parser, &event);
gvm_json_path_elem_t *path_tail = g_queue_peek_tail (event.path);
if (event.type == GVM_JSON_PULL_EVENT_ARRAY_START
gvm_json_path_elem_t *path_tail = g_queue_peek_tail (event.path);
if (event.type == GVM_JSON_PULL_EVENT_ARRAY_START
&& path_tail && strcmp (path_tail->key, "epss_scores") == 0)
{
epss_scores_found = TRUE;
Expand All @@ -4555,12 +4555,12 @@ update_epss_scores ()

sql_begin_immediate ();
inserts_init (&inserts,
EPSS_MAX_CHUNK_SIZE,
setting_secinfo_sql_buffer_threshold_bytes (),
"INSERT INTO scap2.epss_scores"
" (cve, epss, percentile)"
" VALUES ",
" ON CONFLICT (cve) DO NOTHING");
EPSS_MAX_CHUNK_SIZE,
setting_secinfo_sql_buffer_threshold_bytes (),
"INSERT INTO scap2.epss_scores"
" (cve, epss, percentile)"
" VALUES ",
" ON CONFLICT (cve) DO NOTHING");

gvm_json_pull_parser_next (&parser, &event);
while (event.type == GVM_JSON_PULL_EVENT_OBJECT_START)
Expand Down Expand Up @@ -4599,13 +4599,13 @@ update_epss_scores ()
"Field 'percentile' in item is not a number");

insert_epss_score_entry (&inserts,
cve_json->valuestring,
epss_json->valuedouble,
percentile_json->valuedouble);
cve_json->valuestring,
epss_json->valuedouble,
percentile_json->valuedouble);

gvm_json_pull_parser_next (&parser, &event);
cJSON_Delete (epss_entry);
}
}
}
else if (event.type == GVM_JSON_PULL_EVENT_ERROR)
{
Expand Down

0 comments on commit 884d6fc

Please sign in to comment.