remove unused sigar param in ptql_query_{create,destroy}

This commit is contained in:
Doug MacEachern 2007-02-20 01:54:00 +00:00
parent 39870c98d5
commit 20d17f623e
2 changed files with 7 additions and 12 deletions

View File

@ -21,15 +21,13 @@
typedef struct sigar_ptql_query_t sigar_ptql_query_t;
SIGAR_DECLARE(int) sigar_ptql_query_create(sigar_t *sigar,
sigar_ptql_query_t **query,
SIGAR_DECLARE(int) sigar_ptql_query_create(sigar_ptql_query_t **query,
char *ptql);
SIGAR_DECLARE(int) sigar_ptql_query_match(sigar_t *sigar,
sigar_ptql_query_t *query,
sigar_pid_t pid);
SIGAR_DECLARE(int) sigar_ptql_query_destroy(sigar_t *sigar,
sigar_ptql_query_t *query);
SIGAR_DECLARE(int) sigar_ptql_query_destroy(sigar_ptql_query_t *query);
#endif /*SIGAR_PTQL_H*/

View File

@ -436,8 +436,7 @@ static int ptql_branch_list_grow(ptql_branch_list_t *branches)
return SIGAR_OK;
}
static int ptql_branch_list_destroy(sigar_t *sigar,
ptql_branch_list_t *branches)
static int ptql_branch_list_destroy(ptql_branch_list_t *branches)
{
if (branches->size) {
int i;
@ -1064,8 +1063,7 @@ static int ptql_branch_compare(const void *b1, const void *b2)
branch2->lookup->type;
}
SIGAR_DECLARE(int) sigar_ptql_query_create(sigar_t *sigar,
sigar_ptql_query_t **queryp,
SIGAR_DECLARE(int) sigar_ptql_query_create(sigar_ptql_query_t **queryp,
char *ptql)
{
char *ptr, *ptql_copy = strdup(ptql);
@ -1108,7 +1106,7 @@ SIGAR_DECLARE(int) sigar_ptql_query_create(sigar_t *sigar,
free(ptql_copy);
if (status != SIGAR_OK) {
sigar_ptql_query_destroy(sigar, query);
sigar_ptql_query_destroy(query);
*queryp = NULL;
}
else if (query->branches.number > 1) {
@ -1121,10 +1119,9 @@ SIGAR_DECLARE(int) sigar_ptql_query_create(sigar_t *sigar,
return status;
}
SIGAR_DECLARE(int) sigar_ptql_query_destroy(sigar_t *sigar,
sigar_ptql_query_t *query)
SIGAR_DECLARE(int) sigar_ptql_query_destroy(sigar_ptql_query_t *query)
{
ptql_branch_list_destroy(sigar, &query->branches);
ptql_branch_list_destroy(&query->branches);
free(query);
return SIGAR_OK;
}