1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Replace val with __val in TUNABLE_SET_VAL_IF_VALID_RANGE

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.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
H.J. Lu
2020-06-04 12:53:28 -07:00
parent 3f6e4fc454
commit 9b7424215b

View File

@ -93,9 +93,9 @@ get_next_env (char **envp, char **name, size_t *namelen, char **val,
__type min = (__cur)->type.min; \ __type min = (__cur)->type.min; \
__type max = (__cur)->type.max; \ __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; \ (__cur)->initialized = true; \
} \ } \
}) })