mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Fix getting tunable values on big-endian (BZ #21109)
The code to set value passed a tunable_val_t, which when cast to int32_t on big-endian gives the wrong value. Instead, use tunable_val_t.numval instead, which can then be safely cast into int32_t.
This commit is contained in:
@ -455,6 +455,8 @@ __tunable_set_val (tunable_id_t id, void *valp, tunable_callback_t callback)
|
||||
if (cur->strval == NULL)
|
||||
return;
|
||||
|
||||
/* Caller does not need the value, just call the callback with our tunable
|
||||
value. */
|
||||
if (valp == NULL)
|
||||
goto cb;
|
||||
|
||||
|
Reference in New Issue
Block a user