1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-22 06:50:52 +03:00

filter: use pointers to real addresses

instead of casting values 1 and 2 to pointers
which gcc optimization can have problems with.
This commit is contained in:
David Teigland 2018-06-21 10:52:35 -05:00
parent dd075e93c1
commit 4afb5971b9

View File

@ -50,12 +50,15 @@ struct pfilter {
* by default. The old code for it should be removed.
*/
static int _good_device;
static int _bad_device;
/*
* The hash table holds one of these two states
* against each entry.
*/
#define PF_BAD_DEVICE ((void *) 1)
#define PF_GOOD_DEVICE ((void *) 2)
#define PF_BAD_DEVICE ((void *) &_good_device)
#define PF_GOOD_DEVICE ((void *) &_bad_device)
static int _init_hash(struct pfilter *pf)
{