mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Remove unused net_find_af_val function, and network_families array
Like net_find_af_name, this assumed that AF_* values were consecutive. [smcv: split out from a larger patch, added commit message, removed dead declaration] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
097c520293
commit
8782872fe2
2 changed files with 0 additions and 20 deletions
|
@ -321,25 +321,6 @@ struct aa_network_entry *network_entry(const char *family, const char *type,
|
|||
|
||||
#define ALL_TYPES 0x43e
|
||||
|
||||
/* another case of C++ not supporting non-trivial designated initializers */
|
||||
#undef AA_GEN_NET_ENT
|
||||
#define AA_GEN_NET_ENT(name, AF) name, /* [AF] = name, */
|
||||
|
||||
static const char *network_families[] = {
|
||||
#include "af_names.h"
|
||||
};
|
||||
|
||||
int net_find_af_val(const char *af)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; network_families[i]; i++) {
|
||||
if (strcmp(network_families[i], af) == 0)
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char *net_find_af_name(unsigned int af)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -125,7 +125,6 @@ struct network {
|
|||
|
||||
int net_find_type_val(const char *type);
|
||||
const char *net_find_type_name(int type);
|
||||
int net_find_af_val(const char *af);
|
||||
const char *net_find_af_name(unsigned int af);
|
||||
const struct network_tuple *net_find_mapping(const struct network_tuple *map,
|
||||
const char *family,
|
||||
|
|
Loading…
Add table
Reference in a new issue