1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-06 10:00:40 +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 15826214f9
commit dd7ebec120

View File

@ -43,12 +43,15 @@ struct pfilter {
* do this.
*/
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)
{