Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust alignment #2302

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/manage_sql_secinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
inserts->statements_size += inserts->statement->len;
inserts->statement = NULL;
inserts->current_chunk_size = 0;

if (inserts->max_statements_size
&& inserts-> statements_size >= inserts->max_statements_size)
{
Expand Down Expand Up @@ -3069,8 +3069,8 @@
{
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, "CVE_Items") == 0)
if (event.type == GVM_JSON_PULL_EVENT_ARRAY_START && path_tail
&& path_tail->key && strcmp (path_tail->key, "CVE_Items") == 0)

Check warning on line 3073 in src/manage_sql_secinfo.c

View check run for this annotation

Codecov / codecov/patch

src/manage_sql_secinfo.c#L3073

Added line #L3073 was not covered by tests
{
cve_items_found = TRUE;
}
Expand Down Expand Up @@ -3399,7 +3399,7 @@
__func__, strerror (errno));
ret = -1;
}
g_free (current_json_path);
g_free (current_json_path);

Check warning on line 3402 in src/manage_sql_secinfo.c

View check run for this annotation

Codecov / codecov/patch

src/manage_sql_secinfo.c#L3402

Added line #L3402 was not covered by tests
return ret;
}

Expand Down Expand Up @@ -3428,8 +3428,8 @@
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);

Check warning on line 3431 in src/manage_sql_secinfo.c

View check run for this annotation

Codecov / codecov/patch

src/manage_sql_secinfo.c#L3431

Added line #L3431 was not covered by tests
if (event.type == GVM_JSON_PULL_EVENT_ARRAY_START
&& path_tail && strcmp (path_tail->key, "epss_scores") == 0)
{
epss_scores_found = TRUE;
Expand All @@ -3455,12 +3455,12 @@

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 @@ -3499,13 +3499,13 @@
"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,

Check warning on line 3502 in src/manage_sql_secinfo.c

View check run for this annotation

Codecov / codecov/patch

src/manage_sql_secinfo.c#L3502

Added line #L3502 was not covered by tests
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
Loading