Skip to content

Commit

Permalink
Change update_scap_extra return type to void
Browse files Browse the repository at this point in the history
The return value was always 0, so it can be removed.
  • Loading branch information
timopollmeier committed Jun 5, 2024
1 parent 12c5bec commit 5306d34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/manage_sql_nvts.c
Original file line number Diff line number Diff line change
Expand Up @@ -2681,7 +2681,7 @@ manage_rebuild (GSList *log_config, const db_conn_info_t *database)
}

if (ret == 0)
ret = update_scap_extra ();
update_scap_extra ();

feed_lockfile_unlock (&lockfile);
manage_option_cleanup ();
Expand Down
10 changes: 3 additions & 7 deletions src/manage_sql_secinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -3980,25 +3980,21 @@ update_scap (gboolean reset_scap_db)

/**
* @brief Update extra data in the SCAP DB that depends on other feeds.
*
* @return 0 success, -1 error.
*/
int
void
update_scap_extra ()
{
if (manage_scap_loaded () == 0)
{
g_info ("%s: SCAP database missing, skipping extra data update",
__func__);
return 0;
return;
}

g_debug ("%s: update SCAP extra data of VTs", __func__);
setproctitle ("Syncing SCAP: Updating VT extra data");

update_vt_scap_extra_data ();

return 0;
}

/**
Expand Down Expand Up @@ -4049,7 +4045,7 @@ rebuild_scap ()
ret = 2;

if (ret == 0)
ret = update_scap_extra ();
update_scap_extra ();

if (feed_lockfile_unlock (&lockfile))
{
Expand Down
2 changes: 1 addition & 1 deletion src/manage_sql_secinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ get_secinfo_commit_size ();
void
set_secinfo_commit_size (int);

int
void
update_scap_extra ();

#endif /* not _GVMD_MANAGE_SQL_SECINFO_H */

0 comments on commit 5306d34

Please sign in to comment.