mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Merge Remove unused and broken dup_value_list function
This function was broken all this time: instead of duplicating each entry in the list, it would duplicate the first entry n times. Since this function is currently not used anywhere, delete it instead of fixing it. Signed-off-by: Ryan Lee <ryan.lee@canonical.com> MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1421 Approved-by: Georgia Garcia <georgia.garcia@canonical.com> Merged-by: John Johansen <john@jjmx.net>
This commit is contained in:
commit
d0d6975a1f
2 changed files with 0 additions and 32 deletions
|
@ -436,7 +436,6 @@ extern void free_var_string(struct var_string *var);
|
||||||
extern void warn_uppercase(void);
|
extern void warn_uppercase(void);
|
||||||
extern int is_blacklisted(const char *name, const char *path);
|
extern int is_blacklisted(const char *name, const char *path);
|
||||||
extern struct value_list *new_value_list(char *value);
|
extern struct value_list *new_value_list(char *value);
|
||||||
extern struct value_list *dup_value_list(struct value_list *list);
|
|
||||||
extern void free_value_list(struct value_list *list);
|
extern void free_value_list(struct value_list *list);
|
||||||
extern void print_value_list(struct value_list *list);
|
extern void print_value_list(struct value_list *list);
|
||||||
extern struct cond_entry *new_cond_entry(char *name, int eq, struct value_list *list);
|
extern struct cond_entry *new_cond_entry(char *name, int eq, struct value_list *list);
|
||||||
|
|
|
@ -1208,37 +1208,6 @@ void free_value_list(struct value_list *list)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct value_list *dup_value_list(struct value_list *list)
|
|
||||||
{
|
|
||||||
struct value_list *entry, *dup, *head = NULL;
|
|
||||||
char *value;
|
|
||||||
|
|
||||||
list_for_each(list, entry) {
|
|
||||||
value = NULL;
|
|
||||||
if (list->value) {
|
|
||||||
value = strdup(list->value);
|
|
||||||
if (!value)
|
|
||||||
goto fail2;
|
|
||||||
}
|
|
||||||
dup = new_value_list(value);
|
|
||||||
if (!dup)
|
|
||||||
goto fail;
|
|
||||||
if (head)
|
|
||||||
list_append(head, dup);
|
|
||||||
else
|
|
||||||
head = dup;
|
|
||||||
}
|
|
||||||
|
|
||||||
return head;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
free(value);
|
|
||||||
fail2:
|
|
||||||
free_value_list(head);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void print_value_list(struct value_list *list)
|
void print_value_list(struct value_list *list)
|
||||||
{
|
{
|
||||||
struct value_list *entry;
|
struct value_list *entry;
|
||||||
|
|
Loading…
Add table
Reference in a new issue