Message ID | 20200604195804.1502565-1-hjl.tools@gmail.com |
---|---|
State | New |
Headers | show |
Series | Replace val with __val in TUNABLE_SET_VAL_IF_VALID_RANGE | expand |
On 6/4/20 3:58 PM, H.J. Lu via Libc-alpha wrote: > There are: > > #define TUNABLE_SET_VAL_IF_VALID_RANGE(__cur, __val, __type) \ > ({ \ > __type min = (__cur)->type.min; \ > __type max = (__cur)->type.max; \ > \ > if ((__type) (__val) >= min && (__type) (val) <= max) \ > ^^^ Should be __val > { \ > (__cur)->val.numval = (val); \ > ^^^ Should be __val > (__cur)->initialized = true; \ > } \ > }) > > Luckily since all TUNABLE_SET_VAL_IF_VALID_RANGE usages are > > TUNABLE_SET_VAL_IF_VALID_RANGE (cur, val, int64_t); > > this didn't cause any issues. OK for master. Reviewed-by: Carlos O'Donell <carlos@redhat.com> > --- > elf/dl-tunables.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c > index a1001fe313..26e6e26612 100644 > --- a/elf/dl-tunables.c > +++ b/elf/dl-tunables.c > @@ -93,9 +93,9 @@ get_next_env (char **envp, char **name, size_t *namelen, char **val, > __type min = (__cur)->type.min; \ > __type max = (__cur)->type.max; \ > \ > - if ((__type) (__val) >= min && (__type) (val) <= max) \ > + if ((__type) (__val) >= min && (__type) (__val) <= max) \ > { \ > - (__cur)->val.numval = val; \ > + (__cur)->val.numval = (__val); \ OK. > (__cur)->initialized = true; \ > } \ > }) >
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c index a1001fe313..26e6e26612 100644 --- a/elf/dl-tunables.c +++ b/elf/dl-tunables.c @@ -93,9 +93,9 @@ get_next_env (char **envp, char **name, size_t *namelen, char **val, __type min = (__cur)->type.min; \ __type max = (__cur)->type.max; \ \ - if ((__type) (__val) >= min && (__type) (val) <= max) \ + if ((__type) (__val) >= min && (__type) (__val) <= max) \ { \ - (__cur)->val.numval = val; \ + (__cur)->val.numval = (__val); \ (__cur)->initialized = true; \ } \ })