main: fragment_has_system_dir(): remove want_flags checks as they are redundant
parent
cd0160a4a2
commit
b26e3cf6c7
6
main.c
6
main.c
|
@ -75,26 +75,20 @@ error_handler(const char *msg, const pkgconf_client_t *client, const void *data)
|
||||||
static bool
|
static bool
|
||||||
fragment_has_system_dir(const pkgconf_client_t *client, const pkgconf_fragment_t *frag)
|
fragment_has_system_dir(const pkgconf_client_t *client, const pkgconf_fragment_t *frag)
|
||||||
{
|
{
|
||||||
int check_flags = 0;
|
|
||||||
const pkgconf_list_t *check_paths = NULL;
|
const pkgconf_list_t *check_paths = NULL;
|
||||||
|
|
||||||
switch (frag->type)
|
switch (frag->type)
|
||||||
{
|
{
|
||||||
case 'L':
|
case 'L':
|
||||||
check_flags = PKG_KEEP_SYSTEM_LIBS;
|
|
||||||
check_paths = &client->filter_libdirs;
|
check_paths = &client->filter_libdirs;
|
||||||
break;
|
break;
|
||||||
case 'I':
|
case 'I':
|
||||||
check_flags = PKG_KEEP_SYSTEM_CFLAGS;
|
|
||||||
check_paths = &client->filter_includedirs;
|
check_paths = &client->filter_includedirs;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((want_flags & check_flags) == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return pkgconf_path_match_list(frag->data, check_paths);
|
return pkgconf_path_match_list(frag->data, check_paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue