From dd7ebec12028a65081f676b5f52215b012c75c88 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 21 Jun 2018 10:52:35 -0500 Subject: [PATCH] filter: use pointers to real addresses instead of casting values 1 and 2 to pointers which gcc optimization can have problems with. --- lib/filters/filter-persistent.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/filters/filter-persistent.c b/lib/filters/filter-persistent.c index 1782bfa50..130b1e517 100644 --- a/lib/filters/filter-persistent.c +++ b/lib/filters/filter-persistent.c @@ -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) {