Skip to content

Commit

Permalink
Separate declaration and initialisation.
Browse files Browse the repository at this point in the history
  • Loading branch information
janowagner committed Jun 4, 2019
1 parent 4787c7d commit 3ceefad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/manage_sql_nvts.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,12 @@ insert_nvt (const nvti_t *nvti)

for (i = 0; i < nvti_vtref_len (nvti); i++)
{
vtref_t *ref = nvti_vtref (nvti, i);
gchar *quoted_id = sql_quote (vtref_id (ref));
gchar *quoted_text = sql_quote (vtref_text (ref) ? vtref_text (ref) : "");
vtref_t *ref;
gchar *quoted_id, *quoted_text;

ref = nvti_vtref (nvti, i);
quoted_id = sql_quote (vtref_id (ref));
quoted_text = sql_quote (vtref_text (ref) ? vtref_text (ref) : "");

sql ("INSERT into vt_refs (vt_oid, type, ref_id, ref_text)"
" VALUES ('%s', '%s', '%s', '%s');",
Expand Down

0 comments on commit 3ceefad

Please sign in to comment.