Skip to content

Commit

Permalink
Remove now unused function tag_value()
Browse files Browse the repository at this point in the history
  • Loading branch information
janowagner committed Oct 25, 2019
1 parent 38c0090 commit 2324c44
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
38 changes: 0 additions & 38 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,44 +1151,6 @@ vector_find_filter (const gchar **vector, const gchar *string)
return 0;
}

/**
* @brief Extract a tag from a pipe separated tag list.
*
* @param[in] tags Tag list.
* @param[out] tag Tag name.
*
* @return Newly allocated tag value.
*/
gchar *
tag_value (const gchar *tags, const gchar *tag)
{
gchar **split, **point;

/* creation_date=2009-04-09 14:18:58 +0200 (Thu, 09 Apr 2009)|... */

if (tags == NULL)
return g_strdup ("");

split = g_strsplit (tags, "|", 0);
point = split;

while (*point)
{
if ((strlen (*point) > strlen (tag))
&& (strncmp (*point, tag, strlen (tag)) == 0)
&& ((*point)[strlen (tag)] == '='))
{
gchar *ret;
ret = g_strdup (*point + strlen (tag) + 1);
g_strfreev (split);
return ret;
}
point++;
}
g_strfreev (split);
return g_strdup ("");
}

/**
* @brief Get last time NVT alerts were checked.
*
Expand Down
2 changes: 0 additions & 2 deletions src/manage_sql.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,6 @@ host_nthlast_report_host (const char *, report_host_t *, int);
char*
report_host_ip (const char *);

gchar *tag_value (const gchar *, const gchar *);

void trim_report (report_t);

int delete_report_internal (report_t);
Expand Down

0 comments on commit 2324c44

Please sign in to comment.