]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Replace val with __val in TUNABLE_SET_VAL_IF_VALID_RANGE
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 4 Jun 2020 19:53:28 +0000 (12:53 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 4 Jun 2020 21:01:14 +0000 (14:01 -0700)
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>
elf/dl-tunables.c

index a1001fe31304f4c0b45905f9bdaf80a2b40f8d99..26e6e266120596b8041e2ce133d057f8dc7838a8 100644 (file)
@@ -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;                                           \
     }                                                                        \
 })